-
Notifications
You must be signed in to change notification settings - Fork 265
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
use native fetch (if available) #585
Conversation
58074cf
to
aaee9cf
Compare
Codecov Report
@@ Coverage Diff @@
## master #585 +/- ##
=======================================
Coverage 92.98% 92.98%
=======================================
Files 38 38
Lines 2167 2168 +1
Branches 454 455 +1
=======================================
+ Hits 2015 2016 +1
Misses 152 152
Continue to review full report at Codecov.
|
@@ -52,7 +52,7 @@ function fetchRequest(method: string, url: string, args: FetchOptions) { | |||
if (contentType === 'application/json' && body && typeof body !== 'string') { | |||
body = JSON.stringify(body); | |||
} | |||
|
|||
var fetch = global.fetch || crossFetch; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add a test to make sure global fetch is called if fetch is defined else crossFetch is called.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🏅
This bypasses the
cross-fetch
module when native fetch is available