1.0.0 • Published 3 years ago
@rogal/http-client v1.0.0
Http Client
An adapter to make http requests and abstract from fetching packages
Install
npm install @rogal/http-client --save
Getting Started
const httpClient = new HttpClient({
baseUrl: 'http://localhost:3001',
});
httpClient.get('/todos').then(response => {
console.log('response', response);
}).catch(err => {
console.log('err doing response')
})
Methods
- httpClient.get
- httpClient.post
- httpClient.put
- httpClient.delete
Interceptor
We offer you an interceptor so you can observe calls.
HttpClientInterceptor().then(response => {
// do something with the response
}).catch(err => {
// do something with the error
}) ;
How to contribute
You can install and have an enviroment ready for use with Storybook
npm i
npm start
License
MIT
1.0.0
3 years ago
1.0.0-beta.7
3 years ago
1.0.0-beta.6
3 years ago
1.0.0-beta.5
3 years ago
1.0.0-beta.4
3 years ago
1.0.0-beta.3
4 years ago
1.0.0-beta.2
4 years ago
1.0.0-beta.1
4 years ago