-
Notifications
You must be signed in to change notification settings - Fork 407
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
Replace deprecated requests
with node-fetch
#191
Merged
Merged
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
5cee15c
Add test for custom user agent header if browser
rmeritz bec747d
Add test of retry if hitting rate limit
rmeritz bd98f7f
Replace deprecated request library with node-fetch
rmeritz f90d893
Add back timeout to request
rmeritz eca8edc
Rebuild the test/test_files/airtable.browser.js
rmeritz a5f960c
Add test of timeout abort
rmeritz 0bb0460
Ensure fetch works in node 8
rmeritz 2bca72d
Replace second use of requests module
rmeritz 8b92079
Ensure airtable.js browser build works
rmeritz 99bb192
Add docs to README about requirements
rmeritz a24d8ec
Add polyfills for older browser versions
rmeritz 4672267
Minor fixes from review
rmeritz d1f8de1
Fix grammer in README
rmeritz ce08308
Add additional spelling fix in README.md
rmeritz f84c989
Add test for requests with empty bodies
rmeritz 501310a
Preserve behavior from request library
rmeritz 32152b6
Add test to handle errors with empty bodies
rmeritz dbe0992
Preserve error handling behavior for bodyless err
rmeritz 9b52c14
Add parse json body to response object
rmeritz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// istanbul ignore file | ||
if (typeof window === 'undefined') { | ||
module.exports = require('abort-controller'); | ||
} else { | ||
if ('signal' in new Request('')) { | ||
module.exports = window.AbortController; | ||
} else { | ||
var polyfill = require('abortcontroller-polyfill/dist/cjs-ponyfill'); | ||
module.exports = polyfill.AbortController; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
var fetch = require('node-fetch'); | ||
|
||
// istanbul ignore next | ||
module.exports = typeof window === 'undefined' ? fetch : window.fetch; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
im assuming the
JSON.stringify
was previously handled by the request library?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.
It was.