fetch-it: enhanced HTTP client based on fetch
Hello world, we’re presenting fetch-it: an enhanced HTTP client based on fetch.
For those of you who are not familiar with fetch, here is a formal definition:
The Fetch API provides an interface for fetching resources (e.g., across the network). It will seem familiar to anyone who has used XMLHttpRequest, but the new API provides a more powerful and flexible feature set.
Since discovering new things is very (very) exciting, I’ve been testing fetch for a while. Well, discovering new things is not the only reason, fetch is on its way to become a recommendation - at the moment a living standard - so it’s great to keep updated.
After playing around with fetch for a while, it was quite obvious the lack of features possible to find at $http in Angular. With this in mind and having tried Axios when developing with Node, I thought it could be great to add those features on top of fetch.
Who is useful for?
Fetch starters who are used to $http or Axios and want to boost fetch with some cool features.
What features does fetch-it supports?
- Middlewares
- Custom config instances
- Bonus: Pre-built middleware to build automatic transforms for JSON data (yes, same idea as un Axios)
What are fetch-it expectations?
At the moment, considering the features built, fetch-it aims to improve fetch primary experience. For the future, considering a deeper knowledge about fetch functionalities, fetch-it will provide new features to be a natural add-on for fetch users.
Some roadmap ideas
- Build a $resource project on top of fetch-it, Angular style.
- Enhance documentation.
Every contribution is more than welcome and we’ll surely keep the post updated whenever a new feature is added. Hope you find it useful, relax & code!
Update: Version 0.2.0 - Make fetch-it work one NodeJS environment.
Links:
Like what you read?
Subscribe to our newsletter and get updates on Deep Learning, NLP, Computer Vision & Python.
No spam, ever. We'll never share your email address and you can opt out at any time.