proactive-http-fetch
v0.1.0
Published
Proactive http fetch package
Downloads
15
Maintainers
Readme
proactive-http-fetch
Proactive http fetch npm library.
Follow these steps:
- run npm install proactive-http-fetch
Usage
- create a new file http-fetch-test.ts.
import { Container } from 'aurelia-dependency-injection';
import { HttpFetch } from 'proactive-http-fetch';
let httpFetch = new Container().get(HttpFetch) as HttpFetch;
httpFetch
.get('https://jsonplaceholder.typicode.com/posts/1')
.then(response => console.log(response));
- run tsc http-fetch-client.ts and the result should be:
{
"userId": 1,
"id": 1,
"title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
"body": "quia et suscipit suscipit recusandae consequuntur expedita et cum reprehenderit molestiae ut ut quas totam nostrum rerum est autem sunt rem eveniet architecto"
}