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

Commit 0b7e9f3

Browse files
authored
Merge pull request #33 from ncnlinh/patch-1
Fix "PUT" requests being sent as "POST"
2 parents 2911491 + 3e78471 commit 0b7e9f3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/android/src/main/java/com/RNFetchBlob/RNFetchBlobReq.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,9 +129,9 @@ else if(type == "form")
129129
break;
130130
case "put" :
131131
if(this.type == null || this.type.equalsIgnoreCase("octet"))
132-
req.post(ctx, url, entity, "application/octet-stream", handler);
132+
req.put(ctx, url, entity, "application/octet-stream", handler);
133133
else
134-
req.post(ctx, url, entity, "multipart/form-data", handler);
134+
req.put(ctx, url, entity, "multipart/form-data", handler);
135135
break;
136136
case "delete" :
137137
req.delete(url, handler);

0 commit comments

Comments
 (0)