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:
Sreejumon
2016-02-12 04:51:01 -08:00
committed by facebook-github-bot-7
parent 84f51da123
commit a7521a23ae

View File

@@ -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(