A framework for building native applications using React
Reverted commit D3040735
Summary:This is a follow up of https://github.com/facebook/react-native/commit/9b87e6c860a95fe3d55285314d3d56be06cb7833. - 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
C
Christopher Dro committed
e674e45c2e090d5c2ea6ba6d1a783471ff4675de
Parent: b653d43
Committed by Facebook Github Bot 0 <[email protected]>
on 3/15/2016, 2:20:26 PM