kl-api-service
v1.0.0
Published
API Services Angular - POST, GET, DELETE, UPDATE Http
Readme
string-jaws
The kl-api-service library exported as Angular.ts Service.
Docs
API Service is design to make API calls (POST, GET, DELETE, UPDATE) using Angular 2 HTTP serice using RXJS for Observables
Installation
npm install api-serviceAPI Functions
This is an Angular Serivice. Make sure to include the service in your list of providers for the Module
Providers = [APIService]Then inject the service into the constructor
Constructor(private api:APIService) {}The Following is how to make a GET call
let url = 'api.openweathermap.org/data/2.5/weather?q=London'
this.api.getRequest(url2).subscribe(
data => console.log('DATA: ', data)
)Support
Tested in Chrome 53-54, Firefox 48-49, IE 11, Edge 14, Safari 9-10, Node.js 6-7, & PhantomJS 2.1.1. Automated test runs are available.
