mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-23 11:57:46 +08:00
Prettier React Native Libraries
Reviewed By: sahrens Differential Revision: D7961488 fbshipit-source-id: 05f9b8b0b91ae77f9040a5321ccc18f7c3c1ce9a
This commit is contained in:
committed by
Facebook Github Bot
parent
1e2de71290
commit
d01ab66b47
@@ -4,8 +4,10 @@
|
||||
* This source code is licensed under the MIT license found in the
|
||||
* LICENSE file in the root directory of this source tree.
|
||||
*
|
||||
* @format
|
||||
* @flow
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
// Do not require the native RCTNetworking module directly! Use this wrapper module instead.
|
||||
@@ -39,7 +41,6 @@ function generateRequestId(): number {
|
||||
* requestId to each network request that can be used to abort that request later on.
|
||||
*/
|
||||
class RCTNetworking extends NativeEventEmitter {
|
||||
|
||||
isAvailable: boolean = true;
|
||||
|
||||
constructor() {
|
||||
@@ -56,11 +57,11 @@ class RCTNetworking extends NativeEventEmitter {
|
||||
incrementalUpdates: boolean,
|
||||
timeout: number,
|
||||
callback: (requestId: number) => any,
|
||||
withCredentials: boolean
|
||||
withCredentials: boolean,
|
||||
) {
|
||||
const body = convertRequestBody(data);
|
||||
if (body && body.formData) {
|
||||
body.formData = body.formData.map((part) => ({
|
||||
body.formData = body.formData.map(part => ({
|
||||
...part,
|
||||
headers: convertHeadersMapToArray(part.headers),
|
||||
}));
|
||||
@@ -75,7 +76,7 @@ class RCTNetworking extends NativeEventEmitter {
|
||||
responseType,
|
||||
incrementalUpdates,
|
||||
timeout,
|
||||
withCredentials
|
||||
withCredentials,
|
||||
);
|
||||
callback(requestId);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user