Bump fetch and add exports/globals for Headers, Request and Response

Summary:
Now on fetch 0.8.1, the latest tagged release. Previous version used was 0.7.0. See #1162 cc @vjeux @jtremback
Closes https://github.com/facebook/react-native/pull/1192
Github Author: Brent Vatne <brent.vatne@madriska.com>

Test Plan: I arc patched and ran movies demo and storyline, they work fine
This commit is contained in:
Brent Vatne
2015-05-07 12:29:36 -07:00
parent 1ef4e00fba
commit 7141948a05
5 changed files with 133 additions and 65 deletions

View File

@@ -135,7 +135,12 @@ function setupXHR() {
// The native XMLHttpRequest in Chrome dev tools is CORS aware and won't
// let you fetch anything from the internet
GLOBAL.XMLHttpRequest = require('XMLHttpRequest');
GLOBAL.fetch = require('fetch');
var fetchPolyfill = require('fetch');
GLOBAL.fetch = fetchPolyfill.fetch;
GLOBAL.Headers = fetchPolyfill.Headers;
GLOBAL.Request = fetchPolyfill.Request;
GLOBAL.Response = fetchPolyfill.Response;
}
function setupGeolocation() {

View File

@@ -17,8 +17,6 @@ var RCTSourceCode = require('NativeModules').SourceCode;
var SourceMapConsumer = require('SourceMap').SourceMapConsumer;
var SourceMapURL = require('./source-map-url');
var fetch = require('fetch');
function loadSourceMap(): Promise {
return fetchSourceMap()
.then(map => new SourceMapConsumer(map));