lit-request is a byte-sized (currently (852) bytes minified / gzipped bundle
) micro-library which provides the awesome parts of Axios which many developers find very useful.
It's an abstraction layer based on the browser native Fetch API which does all the work under the hood with many popular browsers having support and as popular libraries like React/Preact using pollyfills when needed, Other amazing libraries supported as well.
Inspired by Axios / Redaxios with API and simplicity.
Can't I Just use Axios? 😄
Yes, it's adviced if you prefer to, Axios is amazing, battle-tested and supports node js with more features than lit-request
.
You may find lit useful for projects where bundle size and lighweight performance matters as well as for quick demos, codepens, sandboxes, hackathons and even full side-projects that runs on any modern browser.
Please refer to the Axios Documentation (lit-request has an almost exact api).
- Config
- Convienence Method Aliases
- Request / Response Interceptors
- Cancel / Abort Request
- Instances
- Defaults
- XSRF Cookie Protection
- Transform Request/Response
- Params
- Auth
npm install lit-request
import lit from 'lit-request';