react-native/React
Alex Kotliarskyi e2b25c8c9d Add multipart response stream reader
Summary:
Packager can take a long time to load and the progress is usually displayed in another window (Terminal). I'm adding support for showing a UI inside React Native app for packager's progress when loading a bundle.

This is how it will work:

1. React Native sends request to packager with `Accept: multipart/mixed` header.
2. Packager will detect that header to detect that client supports progress events and will reply with `Content-Type: multipart/mixed`.
3. While building the bundle it will emit chunks with small metadata (like `{progress: 0.3}`). In the end it will send the last chunk with the content of the bundle.
4. RN runtime will be receiving the events, for each progress event it will update the UI. The last chunk will be the actual bundle which will end the download process.

This workflow is totally backwards-compatible -- normally RN doesn't set the `Accept` header.

Reviewed By: mmmulani

Differential Revision: D3845684

fbshipit-source-id: 5b3d2c5a4c6f4718d7e5de060d98f17491e82aba
2016-10-03 18:13:36 -07:00
..
Base Add multipart response stream reader 2016-10-03 18:13:36 -07:00
CSSLayout Free memory used in tests to enable use of valgrind 2016-09-29 04:13:33 -07:00
Executors Fix [JSValue ...] & [JSContext ...] access with custom JSC 2016-09-27 09:43:30 -07:00
Modules StatusBar: barStyle support for Android (API 23+) 2016-09-30 12:58:37 -07:00
Profiler Apple TV support 1: existing Objective C code should compile for tvOS 2016-09-27 06:28:33 -07:00
React.xcodeproj Add multipart response stream reader 2016-10-03 18:13:36 -07:00
Views Apple TV support 1: existing Objective C code should compile for tvOS 2016-09-27 06:28:33 -07:00