proactive-http-fetch
TypeScript icon, indicating that this package has built-in type declarations

0.1.0 • Public • Published

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"
}

Package Sidebar

Install

npm i proactive-http-fetch

Weekly Downloads

1

Version

0.1.0

License

MIT

Unpacked Size

362 kB

Total Files

20

Last publish

Collaborators

  • promideait