File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed
packages/http-client-java/generator
http-client-generator-clientcore-test/src/test/java/type/file
http-client-generator-test/src/test/java/type/file Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change 33
44package type .file ;
55
6+ import io .clientcore .core .http .models .HttpHeaderName ;
7+ import io .clientcore .core .http .models .RequestContext ;
68import io .clientcore .core .models .binarydata .BinaryData ;
79import java .nio .file .Path ;
810import org .junit .jupiter .api .Assertions ;
@@ -60,7 +62,8 @@ public void testDownloadFileMultipleContentTypes() {
6062 @ Test
6163 public void testUploadFileDefaultContentType () {
6264 BinaryData fileData = BinaryData .fromFile (PNG_FILE );
63- client .uploadFileDefaultContentType (fileData , fileData .getLength ());
65+ client .uploadFileDefaultContentTypeWithResponse (fileData , fileData .getLength (),
66+ RequestContext .builder ().setHeader (HttpHeaderName .CONTENT_TYPE , "image/png" ).build ());
6467 }
6568
6669 @ Test
Original file line number Diff line number Diff line change 33
44package type .file ;
55
6+ import com .azure .core .http .HttpHeaderName ;
7+ import com .azure .core .http .rest .RequestOptions ;
68import com .azure .core .util .BinaryData ;
79import java .nio .file .Path ;
810import org .junit .jupiter .api .Assertions ;
@@ -54,7 +56,8 @@ public void testDownloadFileMultipleContentTypes() {
5456
5557 @ Test
5658 public void testUploadFileDefaultContentType () {
57- client .uploadFileDefaultContentType (BinaryData .fromFile (PNG_FILE ));
59+ client .uploadFileDefaultContentTypeWithResponse (BinaryData .fromFile (PNG_FILE ),
60+ new RequestOptions ().setHeader (HttpHeaderName .CONTENT_TYPE , "image/png" ));
5861 }
5962
6063 @ Test
You can’t perform that action at this time.
0 commit comments