react-native-macos/Libraries/Network
Arthur Lee 2fe3dd2e7d Use fetch as a polyfill
Summary:
The old whatwg-fetch module doesn't actually export anything, so we would always hit the `else` condition.

The new whatwg-fetch (3.0.0, introduced in #24418) now exports an ES module. As a result, `whatwg` and `whatwg.fetch` are both truthy but the `module.exports` will end up empty. This breaks the RN fetch module.

This will switch the behavior back to the expected polyfill behavior (calling `require('whatwg-fetch')` and allowing it to polyfill fetch in global scope). The RN fetch module will re-export these globals.

Reviewed By: cpojer

Differential Revision: D15639851

fbshipit-source-id: ebd8bce85f7797d8539f53982e515ac47f6425e7
2019-06-06 11:34:11 -07:00
..
RCTNetwork.xcodeproj Update Xcode projects (#19574) 2018-06-19 23:48:12 -07:00
__tests__ add spec for PlatformConstants (#24928) 2019-05-30 14:29:42 -07:00
FormData.js Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
NativeNetworkingAndroid.js Add a lint rule to disallow Haste imports (#25058) 2019-05-30 07:45:16 -07:00
NativeNetworkingIOS.js Add a lint rule to disallow Haste imports (#25058) 2019-05-30 07:45:16 -07:00
RCTDataRequestHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTDataRequestHandler.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTFileRequestHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTFileRequestHandler.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTHTTPRequestHandler.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTHTTPRequestHandler.mm Fixes race condition of Network module (#25156) 2019-06-06 04:07:52 -07:00
RCTNetInfo.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTNetInfo.m Fix Warnings in Xcode (#23184) 2019-01-28 03:57:42 -08:00
RCTNetworkTask.h Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTNetworkTask.m Update copyright headers to yearless format 2018-09-11 15:33:07 -07:00
RCTNetworking.android.js Add spec for Networking (#24892) 2019-05-29 18:33:28 -07:00
RCTNetworking.h Upload full video when passed in a PHAsset 2019-04-29 14:14:11 -07:00
RCTNetworking.ios.js Add spec for Networking (#24892) 2019-05-29 18:33:28 -07:00
RCTNetworking.mm Upload full video when passed in a PHAsset 2019-04-29 14:14:11 -07:00
React-RCTNetwork.podspec Split React.podspec into separate podspecs for each Xcode project (#23559) 2019-02-21 18:35:44 -08:00
XHRInterceptor.js Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749) 2019-05-08 08:48:59 -07:00
XMLHttpRequest.js Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749) 2019-05-08 08:48:59 -07:00
convertRequestBody.js Migrate "Libraries" from Haste to standard path-based requires (sans vendor & renderers) (#24749) 2019-05-08 08:48:59 -07:00
fetch.js Use fetch as a polyfill 2019-06-06 11:34:11 -07:00