@justbe-native-js/fetch-api
v0.1.0
Published
Wrapper around javascript fetch api using rxjs methods and operators.
Readme
Javascript Fetch api powered by Rxjs
Wrapper around javascript fetch api using rxjs methods and operators.Installation
Use the node package manager npm to install @justbe-native-js/fetch-api.
npm install @justbe-native-js/fetch-api --saveUsage
import { FetchApi } from '@justbe-native-js/fetch-api';
constructor(){
let url = 'https://jsonplaceholder.typicode.com/posts/1';
let options = {};
FetchApi.fetch(url, options).subscribe(res => {
console.log(res);
})
}Fetch api options
method?: 'GET' | 'POST' | 'PUT' | 'DELETE';//default GET;
headers?: any;
body?: any;