@upgradableweb/client
v1.2.0
Published
conpact fetch functionalities for react or next with base url and custom header fuctinalty
Downloads
10
Maintainers
Readme
@upgradableweb/client
const data = await POST(/api/login, body)
POST(/api/login, body)
.then(res=>{
console.log(res);
})
.catch(err=>{
console.log(err);
})
POST(/api/login, body,{ onResonse, onError })
const data = await GET(/api/login)
import { fetchConfig } from '@upgradableweb/client'
fetchConfig.baseUrl = 'https://api.example.com'
fetchConfig.headers = { authorization: 'Bearer token' }
$ npm install @upgradableweb/client
License
This software is licensed under the MIT License.