mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-07 17:27:56 +08:00
Created empty requestBody to solve the issue - "POST has no body"
Reviewed By: svcscm Differential Revision: D2931739 fb-gh-sync-id: 04b6f59c257a35e4638c4c8f00bbffb34666145f shipit-source-id: 04b6f59c257a35e4638c4c8f00bbffb34666145f
This commit is contained in:
committed by
facebook-github-bot-7
parent
84f51da123
commit
a7521a23ae
@@ -197,8 +197,7 @@ public final class NetworkingModule extends ReactContextBaseJavaModule {
|
||||
requestBuilder.method(method, multipartBuilder.build());
|
||||
} else {
|
||||
// Nothing in data payload, at least nothing we could understand anyway.
|
||||
// Ignore and treat it as if it were null.
|
||||
requestBuilder.method(method, null);
|
||||
requestBuilder.method(method, RequestBodyUtil.getEmptyBody(method));
|
||||
}
|
||||
|
||||
client.newCall(requestBuilder.build()).enqueue(
|
||||
|
||||
Reference in New Issue
Block a user