2015-02-19 20:10:52 -08:00
|
|
|
/**
|
2015-03-23 13:35:08 -07:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
*
|
2018-02-16 18:24:55 -08:00
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
2015-02-19 20:10:52 -08:00
|
|
|
*
|
|
|
|
* @providesModule fetch
|
2016-07-07 11:03:09 -07:00
|
|
|
*
|
2015-02-19 20:10:52 -08:00
|
|
|
*/
|
2017-07-10 12:01:50 -07:00
|
|
|
|
2018-01-08 16:54:56 -08:00
|
|
|
/* globals Headers, Request, Response */
|
2017-07-10 12:01:50 -07:00
|
|
|
|
2015-02-19 20:10:52 -08:00
|
|
|
'use strict';
|
|
|
|
|
2017-09-11 09:36:25 -07:00
|
|
|
import whatwg from 'whatwg-fetch';
|
2015-02-19 20:10:52 -08:00
|
|
|
|
2017-09-11 09:36:25 -07:00
|
|
|
if (whatwg && whatwg.fetch) {
|
|
|
|
module.exports = whatwg;
|
|
|
|
} else {
|
|
|
|
module.exports = {fetch, Headers, Request, Response};
|
|
|
|
}
|