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

Commit 74ae0ce

Browse files
authored
Merge pull request #147 from cosmith/android-patch
Add PATCH support for upload on Android
2 parents 722626c + 5ea2901 commit 74ae0ce

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ else if (value.equalsIgnoreCase("utf8"))
220220
}
221221
}
222222

223-
if(method.equalsIgnoreCase("post") || method.equalsIgnoreCase("put")) {
223+
if(method.equalsIgnoreCase("post") || method.equalsIgnoreCase("put") || method.equalsIgnoreCase("patch")) {
224224
String cType = getHeaderIgnoreCases(mheaders, "Content-Type").toLowerCase();
225225

226226
if(rawRequestBodyArray != null) {
@@ -281,7 +281,7 @@ else if(cType.isEmpty()) {
281281
break;
282282

283283
case WithoutBody:
284-
if(method.equalsIgnoreCase("POST") || method.equalsIgnoreCase("PUT"))
284+
if(method.equalsIgnoreCase("post") || method.equalsIgnoreCase("put") || method.equalsIgnoreCase("patch"))
285285
{
286286
builder.method(method, RequestBody.create(null, new byte[0]));
287287
}

0 commit comments

Comments
 (0)