mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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
This commit is contained in:
committed by
Facebook Github Bot
parent
e040a198e2
commit
c10c147bcc
@@ -1598,7 +1598,7 @@ namespace JS {
|
||||
requestId:(double)requestId
|
||||
headers:(NSArray *)headers
|
||||
data:(NSDictionary *)data
|
||||
responseType:(NSDictionary *)responseType
|
||||
responseType:(NSString *)responseType
|
||||
useIncrementalUpdates:(BOOL)useIncrementalUpdates
|
||||
timeout:(double)timeout
|
||||
withCredentials:(BOOL)withCredentials;
|
||||
|
||||
@@ -22,7 +22,7 @@ export interface Spec extends TurboModule {
|
||||
requestId: number,
|
||||
headers: Array<Header>,
|
||||
data: Object,
|
||||
responseType: Object, // TODO: Use stricter type.
|
||||
responseType: string,
|
||||
useIncrementalUpdates: boolean,
|
||||
timeout: number,
|
||||
withCredentials: boolean,
|
||||
|
||||
+2
-2
@@ -37,8 +37,8 @@ public abstract class NativeNetworkingAndroidSpec extends ReactContextBaseJavaMo
|
||||
|
||||
@ReactMethod
|
||||
public abstract void sendRequest(String method, String url, double requestId,
|
||||
ReadableArray headers, ReadableMap data, ReadableMap responseType,
|
||||
boolean useIncrementalUpdates, double timeout, boolean withCredentials);
|
||||
ReadableArray headers, ReadableMap data, String responseType, boolean useIncrementalUpdates,
|
||||
double timeout, boolean withCredentials);
|
||||
|
||||
@ReactMethod
|
||||
public abstract void addListener(String eventName);
|
||||
|
||||
Reference in New Issue
Block a user