Commit Graph

3 Commits

Author SHA1 Message Date
Marshall Roch 38f76b32c1 Fix missing types in XHRExample 2015-06-12 14:04:28 -07:00
Philipp von Weitershausen 628609a069 [ReactNative] XHR FormData upload example 2015-06-12 14:04:27 -07:00
Nick Lockwood e00b9ac8f3 Added incremental XMLHttpRequest updates
Summary:
@public

Previously, our XMLHttpRequest implementation would only update the readyState when the download was fully completed. This diff adds support for receiving incremental data updates as the download happens, which can be monitored by adding the onreadystatechange event handler.

As a performance optimization, incremental data updates are only sent if the onreadystatechanged handler has been set in the JS, otherwise it just sends the whole data block once download is complete, as before.

Test Plan:
* Run the UIExplorer XMLHttpRequest example (in both OSS and Catalyst) to see incremental downloads working.
* Run the Movies app to see regular (non-incremental) downloads in action
* Run any network-based app in Catalyst shell to verify RKDataManager still works
2015-06-05 15:21:25 -08:00