@jswork/next-fetch-with-response-type
v1.0.10
Published
Request middleware for responseType.
Downloads
33
Readme
next-fetch-with-response-type
Request middleware for responseType.
installation
npm install -S @jswork/next-fetch-with-response-type
usage
import '@jswork/next-fetch-with-response-type';
const betterFetch = nx.fetchWithResponseType(global.fetch);
betterFetch('https://jsonplaceholder.typicode.com/posts/1', { responseType:'json' }).then(res=>{
console.log('res:', res)
})
license
Code released under the MIT license.