Files
react-native/Libraries/Network/NativeNetworkingAndroid.js
T
Emily Janzer c10c147bcc Fix a parameter type in NativeNetworkingAndroidSpec
Summary:
`responseType` should be a string, not an Object (which gets converted to a NativeMap by TM).

Changelog: [General] [Fixed] Fix the flow type for NativeNetworkingModule

Reviewed By: fkgozali

Differential Revision: D18019418

fbshipit-source-id: 316470ca82241223eafb5b05a54fc2bbf3074821
2019-10-22 19:34:40 -07:00

39 lines
992 B
JavaScript

/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
* @format
*/
'use strict';
import type {TurboModule} from '../TurboModule/RCTExport';
import * as TurboModuleRegistry from '../TurboModule/TurboModuleRegistry';
type Header = [string, string];
export interface Spec extends TurboModule {
+sendRequest: (
method: string,
url: string,
requestId: number,
headers: Array<Header>,
data: Object,
responseType: string,
useIncrementalUpdates: boolean,
timeout: number,
withCredentials: boolean,
) => void;
+abortRequest: (requestId: number) => void;
+clearCookies: (callback: (result: boolean) => void) => void;
// RCTEventEmitter
+addListener: (eventName: string) => void;
+removeListeners: (count: number) => void;
}
export default (TurboModuleRegistry.getEnforcing<Spec>('Networking'): Spec);