getch
v0.11.1
Published
Fetching with monitoring and automatic retry
Readme
getch
Fetch wrapped and using GET with access to text, json, and binary data directly. Raises errors if a response is not a 200. Performs retries using a simple exponential backoff strategy when encountering 500s, and can send monitoring data when configured.
Adaptable using plugins to pre or post process requests and responses.
Install
yarn add getchUsage
import getch from 'getch';
const text = await getch.text('https://a.text/endpoint');
const json = await getch.json('https://a.json/endpoint');