2015-02-20 04:10:52 +00:00
|
|
|
/**
|
2015-03-23 20:35:08 +00:00
|
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* This source code is licensed under the BSD-style license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree. An additional grant
|
|
|
|
* of patent rights can be found in the PATENTS file in the same directory.
|
2015-02-20 04:10:52 +00:00
|
|
|
*
|
|
|
|
* @providesModule fetch
|
2016-07-07 18:03:09 +00:00
|
|
|
*
|
2015-02-20 04:10:52 +00:00
|
|
|
*/
|
2017-07-10 19:01:50 +00:00
|
|
|
|
2018-01-09 00:54:56 +00:00
|
|
|
/* globals Headers, Request, Response */
|
2017-07-10 19:01:50 +00:00
|
|
|
|
2015-02-20 04:10:52 +00:00
|
|
|
'use strict';
|
|
|
|
|
2017-09-11 16:36:25 +00:00
|
|
|
import whatwg from 'whatwg-fetch';
|
2015-02-20 04:10:52 +00:00
|
|
|
|
2017-09-11 16:36:25 +00:00
|
|
|
if (whatwg && whatwg.fetch) {
|
|
|
|
module.exports = whatwg;
|
|
|
|
} else {
|
|
|
|
module.exports = {fetch, Headers, Request, Response};
|
|
|
|
}
|