mirror of
https://github.com/status-im/react-native.git
synced 2025-01-27 09:45:04 +00:00
ensure that RCTNetworking JS function names are consistent with android
Summary: public Recent refactoring of `XMLHttpRequestBase` made use of `abortRequest` instead of the existing `cancelRequest` in iOS. This will simply alias `abortRequest` to `cancelRequest`. Reviewed By: nicklockwood Differential Revision: D2671189 fb-gh-sync-id: 6987d004e5a54973c330e19a1baba19ee41170f0
This commit is contained in:
parent
6dca903a73
commit
18cd0953c2
@ -10,4 +10,21 @@
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
module.exports = require('NativeModules').Networking;
|
||||
var RCTNetworkingNative = require('NativeModules').Networking;
|
||||
|
||||
/**
|
||||
* This class is a wrapper around the native RCTNetworking module.
|
||||
*/
|
||||
class RCTNetworking {
|
||||
|
||||
static sendRequest(query, callback) {
|
||||
RCTNetworkingNative.sendRequest(query, callback);
|
||||
}
|
||||
|
||||
static abortRequest(requestId) {
|
||||
RCTNetworkingNative.cancelRequest(requestId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module.exports = RCTNetworking;
|
||||
|
Loading…
x
Reference in New Issue
Block a user