react-native/Libraries
Christopher Dro e674e45c2e Reverted commit D3040735
Summary:This is a follow up of 9b87e6c860.

- Allows custom headers on connection request
- Adds a default `origin` header to Android, just like iOS

**Introduces no breaking changes.**

I was working on something similar and would like to propose a few changes that make the API more consistent across both iOS and Android platforms and brings this closer to [spec](https://tools.ietf.org/html/rfc6455).

I believe aprock first implementation of adding custom `headers` was correct. It makes sense naming this argument `headers` since we have no other general options available, and the current `options` field is being used to pass in a header anyway.

My use case for custom headers was attaching a token to the `Authorization` header on the connection request. I have been testing this by passing a JWT inside the `Authorization` header and verifying it on the server before establishing a connection.
Closes https://github.com/facebook/react-native/pull/6016

Differential Revision: D3040735

fb-gh-sync-id: 183744d2415b895f9d9fd8ecf6023a546e18a546
shipit-source-id: 183744d2415b895f9d9fd8ecf6023a546e18a546
2016-03-15 07:20:26 -07:00
..
ART Fixed ART background color 2016-01-08 15:42:32 -08:00
ActionSheetIOS Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
AdSupport Text highlighting on iOS 2015-07-24 08:41:58 -08:00
Animated Refactor bezier implementation from bezier-easing library 2016-03-12 14:13:22 -08:00
AppRegistry Update FBSource to use Flow 0.22 2016-03-08 12:39:29 -08:00
AppState Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
AppStateIOS Updating AppState to support the inactive state. 2016-03-10 08:30:24 -08:00
BatchedBridge Implement Android's dispatchViewManagerCommand interface on iOS 2016-01-06 05:58:37 -08:00
CameraRoll Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Components Fix typo in ScrollView childLayoutProps error message 2016-03-14 14:35:27 -07:00
CustomComponents Implements `renderHeader` for legacy navigator. 2016-03-10 17:17:21 -08:00
DebugComponentHierarchy Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Device Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
Devtools RN: Fix Exponential WebSocket Growth from DevTools 2016-03-07 19:20:25 -08:00
Experimental <Incremental> for incremental rendering 2016-03-10 08:14:23 -08:00
Fetch Reject promise if network request failed 2016-03-08 16:37:24 -08:00
Geolocation Geolocation Accuracy and Cached Location Bug 2016-03-08 05:17:21 -08:00
Image Support the scriptURLs observed on Android for asset source resolver 2016-03-05 22:43:25 -08:00
Inspector fix RCTPerfMonitor display unit error 2016-02-26 04:54:32 -08:00
Interaction <Incremental> for incremental rendering 2016-03-10 08:14:23 -08:00
JavaScriptAppEngine Setup RCTNativeAppEventEmitter on init 2016-03-15 03:45:33 -07:00
LayoutAnimation Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Linking Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
LinkingIOS Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Modal Add onShow callback for RCTModalHostView 2016-03-03 12:43:36 -08:00
NativeApp Decouple Module System from Native Calls 2015-12-08 16:03:37 -08:00
NavigationExperimental Implements `renderHeader` for legacy navigator. 2016-03-10 17:17:21 -08:00
Network Fix fbsource errors 2016-03-09 16:54:24 -08:00
Picker Add position to Picker onValueChange's call 2016-02-19 06:50:33 -08:00
Portal Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
PullToRefresh Deprecate PullToRefreshViewAndroid and remove it from the website 2016-02-21 16:17:36 -08:00
PushNotificationIOS Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
QuickPerformanceLogger added QPL for main interactions 2015-09-29 22:25:23 -07:00
RCTTest Replace direct access of NativeModules.UIManager with require('UIManager') 2016-01-30 07:36:34 -08:00
RKBackendNode Wrapped UIManager native module for better abstraction 2015-11-27 07:00:32 -08:00
ReactIOS Update FBSource to use Flow 0.22 2016-03-08 12:39:29 -08:00
ReactNative Update FBSource to use Flow 0.22 2016-03-08 12:39:29 -08:00
Sample Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Settings Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Storage add examples that demonstrate how to use mergeItem, multiMerge, multi… 2016-03-14 17:38:22 -07:00
StyleSheet Remove knowledge of fbjs from the packager 2016-03-02 04:28:38 -08:00
Text Add 'props.lineBreakMode' to Text 2016-03-15 04:16:30 -07:00
Utilities Update Dimensions when device orientation changes 2016-03-15 05:49:25 -07:00
Vibration vibration module 2016-03-03 04:08:31 -08:00
WebSocket Reverted commit D3040735 2016-03-15 07:20:26 -07:00
react-native vibration module 2016-03-03 04:08:31 -08:00
vendor Fix breakages caused by switch to fbjs 2016-03-02 08:26:33 -08: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