react-native-macos/Libraries
Siqi Liu f20d5ed67f Intercept XMLHttpRequest network operations and gather their information in inspector tool
Summary:
This diff
- creates `XHRInterceptor` to intercept all XMLHttpRequest network operations in React Native by monkey-patching.
- enables `XHRInterceptor` in RN development tool "inspector".

This interception and inspector tool work well on both Android and iOS. And this supports interception on any network API based on XMLHttpRequest, especially the Fetch API.

By now, we can intercept 12 information fields of a XMLHttpRequest including method, url, data sent, status, response type, response size, requestHeaders, responseHeaders, response, responseURL, responseType and timeout.

Follow-up:
- Will add UIs in the inspector on top of this diff, to display all the network operation information. (Not in this diff just to make this shorter)
- Will extend this to gather other valuable information towards one XMLHttpRequest.
- Should support other network request APIs like WebSocket.

Reviewed By: davidaurelio

Differential Revision: D3598873

fbshipit-source-id: 3221050ab2ebd876a718fc326646c344d0944a5f
2016-07-27 12:28:32 -07:00
..
ART Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
ActionSheetIOS Update RCTActionSheetManager.m 2016-06-04 16:28:19 -07:00
AdSupport
Animated Delete AnimatedNative-test 2016-07-11 19:43:21 -07:00
AppRegistry Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
AppState iOS: Provide correct initial value for AppState.currentState 2016-07-12 23:28:22 -07:00
BatchedBridge Better folly::dynamic ==> JSValue conversion 2016-07-20 04:28:37 -07:00
BugReporting Unrevert D3518381 2016-07-06 12:58:41 -07:00
CameraRoll Automated changes to remove implicit capture of self in blocks: Libraries/FBReactKit/BUCK 2016-07-07 12:44:14 -07:00
Components Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
CustomComponents Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
DebugComponentHierarchy Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Devtools Get server host in setupDevtools for Android 2016-07-19 05:58:29 -07:00
EventEmitter Fixes EventEmitter#once arguments not getting passed to the listener 2016-06-28 16:13:21 -07:00
Experimental Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
Fetch Fixed what fetch.js exports 2016-07-14 11:13:27 -07:00
Geolocation Update RCTNetworking, RCTNetInfo and RCTLocationManager to use new events system 2016-05-25 04:28:36 -07:00
Image Fix RCTImageLoader's priority 2016-07-27 06:13:20 -07:00
Inspector Intercept XMLHttpRequest network operations and gather their information in inspector tool 2016-07-27 12:28:32 -07:00
Interaction PanResponder should not hold stale handle for interaction. 2016-07-15 11:58:31 -07:00
JavaScriptAppEngine Remove exported constants from RCTTimers to allow lazy initialization 2016-07-15 13:58:40 -07:00
LayoutAnimation Remove `node_modules/react` from the list of discoverable haste modules 2016-07-05 06:44:33 -07:00
Linking Hook up Android intent to Linking.js #7079 2016-06-05 18:58:24 -07:00
LinkingIOS Updated Linking and PushNotificationIOS modules to use NativeEventEmitter 2016-05-27 10:28:23 -07:00
Modal Fix Popover problem for RTL 1/n 2016-07-19 10:43:29 -07:00
NativeAnimation Harmonize native animation callback args with JS 2016-07-05 11:13:23 -07:00
NavigationExperimental Fix navigation card stack pan responder 2016-07-25 11:58:44 -07:00
Network plumb trackingName through to native requests 2016-07-22 11:28:56 -07:00
PushNotificationIOS Update deprecated comment in PushNotificationIOS 2016-07-14 00:13:34 -07:00
QuickPerformanceLogger AdsManager now uses new react native QPL identifiers 2016-07-20 07:28:36 -07:00
RCTTest Convert from React.createClass to ES6 classes 2016-07-26 01:13:31 -07:00
RKBackendNode Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
ReactIOS open in editor button for yellow box 2016-07-13 04:43:25 -07:00
ReactNative Move React Core Integration to a Dependency 2016-04-21 09:28:23 -07:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Automated changes to remove implicit capture of self in blocks: Libraries/FBReactKit/BUCK 2016-07-07 12:44:14 -07:00
Share Add Share module 2016-07-25 03:43:29 -07:00
Storage update AsyncStorage.js documentation 2016-07-15 09:13:51 -07:00
StyleSheet Uniformize links in LayoutPropTypes docs 2016-07-25 09:43:34 -07:00
Text change lineBreakMode to ellipsizeMode 2016-07-25 13:13:35 -07:00
Utilities Intercept XMLHttpRequest network operations and gather their information in inspector tool 2016-07-27 12:28:32 -07:00
Vibration Add support for vibration patterns 2016-03-29 21:45:20 -07:00
WebSocket Add MessageQueue method for executing function and returning its result 2016-07-18 07:13:32 -07:00
react-native Add Share module 2016-07-25 03:43:29 -07:00
vendor Fixed NativeEventListener deregistration 2016-05-16 04:13:56 -07:00
Promise.js Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
promiseRejectionIsError.js Add possibility to `console.error`/redbox on promise rejections 2016-03-15 05:22:22 -07:00