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.
This is a bit of a total breaking change...
This remove the very old legacy request module and replaces it with fetch.
So all the callback style is therefore also removed.
I didn't want to bring any hard dependency on any other
node-fetch
or similar library b/c NodeJS now ships with it built in.So i made it optional to just let the developer bring in any http library they may want to use... it's a bit ashamed that so many different libraries uses different http libraries and can't agree upon one single http library. in our project we ended up with some of our dependencies using request/axios/got/node-fetch... o total dependency hell.
Right now everybody should just use fetch as that is avalible everywhere, Deno, Bun.js, NodeJS, browsers and Service Worker. it's the universal http library that exist everywhere now.