react-native/Libraries/Network
Adam Comella e544563bd2 BREAKING: Android: Support withCredentials flag in XHRs
Summary:
Corresponding iOS PR: #12275

Respect the withCredentials XMLHttpRequest flag for sending cookies with requests. This can reduce payload sizes where large cookies are set for domains.

This should fix #5347.

This is a breaking change because it alters the default behavior of XHR. Prior to this change, XHR would send cookies by default. After this change, by default, XHR does not send cookies which is consistent with the default behavior of XHR on web for cross-site requests. Developers can restore the previous behavior by passing `true` for XHR's `withCredentials` argument.

**Test plan (required)**

Verified in a test app that XHR works properly when specifying `withCredentials` as `true`, `false`, and `undefined`. Also, my team uses this change in our app.

Adam Comella
Microsoft Corp.
Closes https://github.com/facebook/react-native/pull/12276

Differential Revision: D4673646

Pulled By: ericvicenti

fbshipit-source-id: 924c230c9df72071b3cf9151c3ac201905ac28a5
2017-04-10 22:46:12 -07:00
..
RCTNetwork.xcodeproj Enable -Wimplicit-retain-self en sync warning config for all projects 2017-03-23 15:01:34 -07:00
__tests__ Network/FormData typeof object allowing null 2017-02-10 13:30:48 -08:00
FormData.js Network/FormData typeof object allowing null 2017-02-10 13:30:48 -08:00
NetInfo.js Fix the suppress comment regex for react_native 2017-01-19 10:28:28 -08:00
RCTDataRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTDataRequestHandler.m Fix retain cyles in RCTNetworkTask when used with RCTFileRequestHandler and RCTDataRequestHandler 2015-11-04 07:16:26 -08:00
RCTFileRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTFileRequestHandler.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTHTTPRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTHTTPRequestHandler.mm Add lock to RCTHTTPRequestHandler 2016-10-12 08:59:04 -07:00
RCTNetInfo.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNetInfo.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNetworkTask.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNetworkTask.m Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNetworking.android.js BREAKING: Android: Support withCredentials flag in XHRs 2017-04-10 22:46:12 -07:00
RCTNetworking.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNetworking.ios.js BREAKING: iOS: Support withCredentials flag in XHRs 2017-03-08 06:15:15 -08:00
RCTNetworking.mm BREAKING: iOS: Support withCredentials flag in XHRs 2017-03-08 06:15:15 -08:00
XHRInterceptor.js Reorganize core JS files 2016-10-11 10:14:28 -07:00
XMLHttpRequest.js BREAKING: iOS: Support withCredentials flag in XHRs 2017-03-08 06:15:15 -08:00
convertRequestBody.js XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08:00
fetch.js Reorganize core JS files 2016-10-11 10:14:28 -07:00