Skip to content
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

remove Request and move to ESM #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jimmywarting
Copy link

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.

@jimmywarting
Copy link
Author

maybe just wish to have a look at it over at: https://github.com/jimmywarting/routific-node-client/tree/esm#usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant