simple-ingest
1.0.4 • Public • Published Simpler version of Axios based on Fetch API
npm install simple-ingest
import SimpleIngest from 'simple-ingest';
const si = new SimpleIngest();
si.get('https://api.example.com/data')
.then(data => console.log(data))
.catch(error => console.error(error));
si.post('https://api.example.com/data', { key: 'value' })
.then(data => console.log(data))
.catch(error => console.error(error));
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
Readme
Keywords
nonePackage Sidebar
Install
Weekly Downloads