MIT License
An adapter to make http requests and abstract from fetching packages
npm install @rogal/http-client --save
const httpClient = new HttpClient({
baseUrl: 'http://localhost:3001',
});
httpClient.get('/todos').then(response => {
console.log('response', response);
}).catch(err => {
console.log('err doing response')
})
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
}) ;
You can install and have an enviroment ready for use with Storybook
npm i
npm start
MIT