mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-01-30 17:18:41 +08:00
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:
@@ -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() {
|
||||
|
||||
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user