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

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/12275

Differential Revision: D4673644

Pulled By: mkonicek

fbshipit-source-id: 2fd8f536d02fb39d872eb849584c5c4f7e7698c5
2017-03-08 06:15:15 -08:00
..
RCTNetwork.xcodeproj Redo exported headers and include paths for opensource 2016-12-07 15:28:29 -08: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 XHR: support typed arrays for request payloads 2017-01-20 18:43:27 -08: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