Package Exports
- @michaelcoxon/rest-client
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@michaelcoxon/rest-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
rest-client
A simple REST client
- See the api docs at: https://michaelcoxon.github.io/rest-client/
- Check out the tests to see how to use it better.
Installation
The library is available on NPM...
npm -i @michaelcoxon/rest-client101
The only implementation at the moment is for in-browser XMLHttpRequest.
use it like this...
import { XhrHttpClient } from '@michaelcoxon/rest-client'
const client = new XhrHttpClient();
const url = 'https://example.com/api/get-data';
const result = await client.getObjectAsync(url);