Skip to content
This repository has been archived by the owner on Mar 16, 2019. It is now read-only.

Commit

Permalink
Change Android request builder, so that empty content-type will not c…
Browse files Browse the repository at this point in the history
…hanged to octet-stream #425
  • Loading branch information
wkh237 committed Jul 12, 2017
1 parent dd4dbb2 commit 3b58491
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,8 @@ else if (value.equalsIgnoreCase("utf8"))
requestType = RequestType.Form;
}
else if(cType.isEmpty()) {
builder.header("Content-Type", "application/octet-stream");
if(!cType.equalsIgnoreCase(""))
builder.header("Content-Type", "application/octet-stream");
requestType = RequestType.SingleFile;
}
if(rawRequestBody != null) {
Expand Down

0 comments on commit 3b58491

Please sign in to comment.