소스 검색

Merge pull request #126 from LorienHW/master

change android request builder so it wont set Content-Type header to …
Travis Nuttall 5 년 전
부모
커밋
981627e874
No account linked to committer's email address
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3
    1
      android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

+ 3
- 1
android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java 파일 보기

@@ -266,7 +266,9 @@ public class RNFetchBlobReq extends BroadcastReceiver implements Runnable {
266 266
                     requestType = RequestType.Form;
267 267
                 }
268 268
                 else if(cType.isEmpty()) {
269
-                    builder.header("Content-Type", "application/octet-stream");
269
+                    if(!cType.equalsIgnoreCase("")) {
270
+                      builder.header("Content-Type", "application/octet-stream");
271
+                    }
270 272
                     requestType = RequestType.SingleFile;
271 273
                 }
272 274
                 if(rawRequestBody != null) {