simple-ingest
v1.0.4
Published
## Installation ```bash npm install simple-ingest ```
Downloads
2
Readme
Simpler version of Axios based on Fetch API
Installation
npm install simple-ingest
Usage
import SimpleIngest from 'simple-ingest';
const si = new SimpleIngest();
GET Request
si.get('https://api.example.com/data')
.then(data => console.log(data))
.catch(error => console.error(error));
POST Request
si.post('https://api.example.com/data', { key: 'value' })
.then(data => console.log(data))
.catch(error => console.error(error));
Retry Feature
si.get('https://api.example.com/data', { retries: 3, retryDelay: 2000 })
.then(data => console.log(data))
.catch(error => console.error(error));
- retries: Number of retry attempts (default is 0).
- retryDelay: Delay between retries in milliseconds (default is 1000).
Visit https://github.com/francislagasca/ingest