react-native-macos/Libraries/Network
Satyajit Sahoo be56a3efee Implement Blob support for XMLHttpRequest
Summary:
This PR is a followup to https://github.com/facebook/react-native/pull/11417 and should be merged after that one is merged.

  1. Add support for creating blobs from strings, not just other blobs
  1. Add the `File` constructor which is a superset of `Blob`
  1. Add the `FileReader` API which can be used to read blobs as strings or data url (base64)
  1. Add support for uploading and downloading blobs via `XMLHttpRequest` and `fetch`
  1. Add ability to download local files on Android so you can do `fetch(uri).then(res => res.blob())` to get a blob for a local file (iOS already supported this)

  1. Clone the repo https://github.com/expo/react-native-blob-test
  1. Change the `package.json` and update `react-native` dependency to point to this branch, then run `npm install`
  1. Run the `server.js` file with `node server.js`
  1. Open the `index.common.js` file and replace `localhost` with your computer's IP address
  1. Start the packager with `yarn start` and run the app on your device

If everything went well, all tests should pass, and you should see a screen like this:

![screen shot 2017-06-08 at 7 53 08 pm](https://user-images.githubusercontent.com/1174278/26936407-435bbce2-4c8c-11e7-9ae3-eb104e46961e.png)!

Pull to rerun all tests or tap on specific test to re-run it

  [GENERAL] [FEATURE] [Blob] - Implement blob support for XMLHttpRequest
Closes https://github.com/facebook/react-native/pull/11573

Reviewed By: shergin

Differential Revision: D6082054

Pulled By: hramos

fbshipit-source-id: cc9c174fdefdfaf6e5d9fd7b300120a01a50e8c1
2018-01-26 09:17:11 -08:00
..
RCTNetwork.xcodeproj Standardize project indentation settings on 2 spaces 2017-07-31 05:20:03 -07:00
__tests__ Adding @email tags to most of the tests 2017-11-02 06:25:03 -07:00
FormData.js Network/FormData typeof object allowing null 2017-02-10 13:30:48 -08:00
NetInfo.js Update the `NetInfo.isConnected` example code so that it uses the new `connectionChange` event 2017-10-13 18:02:06 -07: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 Add RCTLibraryPathForURL in RCTUtil 2017-12-14 14:31:50 -08:00
RCTHTTPRequestHandler.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTHTTPRequestHandler.mm Added Cookie Header to XML and Websocket request 2017-05-24 09:47:37 -07:00
RCTNetInfo.h Move all header imports to "<React/..>" 2016-11-23 07:58:39 -08:00
RCTNetInfo.m DEPRECATION: Make NetInfo API cross platform and expose whether connection is 2g/3g/4g 2017-07-24 15:50:53 -07: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 Fix RCTNetworking error message 2017-07-11 09:10:20 -07:00
RCTNetworking.h Implement Blob support for XMLHttpRequest 2018-01-26 09:17:11 -08:00
RCTNetworking.ios.js Implement Blob support for XMLHttpRequest 2018-01-26 09:17:11 -08:00
RCTNetworking.mm Implement Blob support for XMLHttpRequest 2018-01-26 09:17:11 -08:00
XHRInterceptor.js Reorganize core JS files 2016-10-11 10:14:28 -07:00
XMLHttpRequest.js Implement Blob support for XMLHttpRequest 2018-01-26 09:17:11 -08:00
convertRequestBody.js Implement Blob support for XMLHttpRequest 2018-01-26 09:17:11 -08:00
fetch.js Fixing eslint-comments warnings 2018-01-08 17:04:29 -08:00