react-native/Libraries/Network
Alexander Blom 274c5c78c4 Support cookies on Android
Summary: This adds a persistent cookie store that shares cookies with WebView.

Add a `ForwardingCookieHandler` to OkHttp that uses the underlying Android webkit `CookieManager`.
Use a `LazyCookieHandler` to defer initialization of `CookieManager` as this will in turn trigger initialization of the Chromium stack in KitKat+ which takes some time. This was we will incur this cost on a background network thread instead of during startup.
Also add a `clearCookies()` method to the network module.

Add a cookies example to the XHR example. This example should also work for iOS (except for the clear cookies part). They are for now just scoped to Android.

Closes #2792.

public

Reviewed By: andreicoman11

Differential Revision: D2615550

fb-gh-sync-id: ff726a35f0fc3c7124d2f755448fe24c9d1caf21
2015-11-23 03:21:31 -08:00
..
RCTNetwork.xcodeproj Added RCTDataRequestHandler 2015-10-19 09:07:06 -07:00
FormData.js Allow duplicate keys in FormData 2015-10-21 15:18:40 -07:00
NetInfo.js - Fix response variable from getCurrentReachability 2015-10-11 19:42:24 -07:00
RCTDataRequestHandler.h Added RCTDataRequestHandler 2015-10-19 09:07:06 -07:00
RCTDataRequestHandler.m Fix retain cyles in RCTNetworkTask when used with RCTFileRequestHandler and RCTDataRequestHandler 2015-11-04 07:16:26 -08:00
RCTFileRequestHandler.h Added RCTFileRequestHandler 2015-10-13 08:14:28 -07:00
RCTFileRequestHandler.m Replaced RCTSparseArray with NSDictionary 2015-11-14 10:28:28 -08:00
RCTHTTPRequestHandler.h Refactored networking logic out into RCTDownloadTask 2015-07-23 04:00:31 -08:00
RCTHTTPRequestHandler.m Added lightweight generic annotations 2015-11-03 14:49:30 -08:00
RCTNetInfo.h Rename RCTReachability to RCTNetInfo 2015-08-14 08:20:01 -08:00
RCTNetInfo.m Rename RCTReachability to RCTNetInfo 2015-08-14 08:20:01 -08:00
RCTNetworkTask.h Fix retain cyles in RCTNetworkTask when used with RCTFileRequestHandler and RCTDataRequestHandler 2015-11-04 07:16:26 -08:00
RCTNetworkTask.m RTCImageStoreManager uses NSData instead of UIImage 2015-11-17 09:55:31 -08:00
RCTNetworking.android.js Support cookies on Android 2015-11-23 03:21:31 -08:00
RCTNetworking.h Added RCTDataRequestHandler 2015-10-19 09:07:06 -07:00
RCTNetworking.ios.js ensure that RCTNetworking JS function names are consistent with android 2015-11-18 15:48:29 -08:00
RCTNetworking.m Reduced work done on main thread by RCTImageLoader 2015-11-17 07:21:29 -08:00
XMLHttpRequest.android.js Send HEADERS_RECEIVED and LOADING events on Android 2015-11-17 06:31:31 -08:00
XMLHttpRequest.ios.js Send HEADERS_RECEIVED and LOADING events on Android 2015-11-17 06:31:31 -08:00
XMLHttpRequestBase.js Send HEADERS_RECEIVED and LOADING events on Android 2015-11-17 06:31:31 -08:00