1.0.1 • Published 5 years ago
getrest v1.0.1
GetRest - simple REST client.
Its an implementation of a basic REST
http client build upon a FETCH
feature that most of modern browser supports.
Installation
npm install getrest
yarn add getrest
Documentation
RestClient
implements interface IRestClient
visible below.
export interface IRestClient<T> {
create: ( obj: T ) => Promise<Response>;
delete: ( id: string ) => Promise<Response>;
getAll: () => Promise<Response>;
getById: ( id: string ) => Promise<Response>;
update: ( obj: T, id: string ) => Promise<Response>;
}