@cannonui/httpjs
v1.6.3
Published
<h1 align="center" style="border-bottom: 2px solid #ebebeb;">CannonHttpJS</h1> <div align="center" style="margin-bottom: 10px;"> <img src="https://img.shields.io/badge/license-MIT-green" /> <a href="https://codecov.io/gh/cannonmaster/CannonHttpJS" > <im
Downloads
20
Readme
CannonHttpJS is a versatile HTTP client library that provides a simple and flexible interface for making HTTP requests in both Node.js and browser environments. It offers features such as request interceptors, response interceptors, caching, and timeout handling. With CannonHttpJS, you can easily handle RESTful APIs and communicate with servers for data retrieval and sending.
- HTTP Methods: Perform common HTTP methods like GET, POST, PUT, PATCH, and DELETE.
- Request Interceptors: Intercept and modify request configurations before sending.
- Response Interceptors: Intercept and modify response data after receiving.
- Caching: Cache responses to improve performance and reduce duplicate requests.
- Timeout Handling: Set a timeout duration to ensure requests do not take too long.
- Base URL: Define a base URL to simplify the setting of request URLs.
- Default Headers: Set default headers to be applied to all requests.
- Retry Mechanism: Configure the number of retries and delay time for failed requests.
npm install @cannonui/httpjs@latest
You're now ready to start using CannonHttpJS in your projects. Enjoy the power and flexibility it offers for handling HTTP requests!
CannonHttpJS is open-source software licensed under the MIT License.