cg-api
v1.0.3
Published
A lightweight JavaScript library for making API requests using the native `fetch` API. This library is designed to work seamlessly with both React and Angular projects, providing simple methods for GET, POST, PUT, and DELETE requests, along with error han
Downloads
6
Readme
API Client Library
A lightweight JavaScript library for making API requests using the native fetch
API. This library is designed to work seamlessly with both React and Angular projects, providing simple methods for GET, POST, PUT, and DELETE requests, along with error handling and the ability to pass custom headers.
Features
- Simple API Requests: Supports GET, POST, PUT, and DELETE requests.
- Error Handling: Handles HTTP errors and provides descriptive messages.
- Custom Headers: Easily add custom headers to your requests.
- Promise-based: Leverages Promises for asynchronous operations.
- Lightweight: Built using the native
fetch
API, with no external dependencies.
Installation
Install the library via npm:
npm install cg-api