jetch
v1.0.3
Published
fetch json the easy way
Downloads
6
Readme
Jetch - fetch JSON
A slightly easier way to fetch json
Usage
import jetch from 'jetch';
try {
var json = await jetch('http://mydomain.com/endpoint.json');
} catch(failedResponse) {
//do something with failedResponse
}
//do something with `json`
a failed response is any response that is not HTTP status code 200