@jswork/next-fetch-with-response-type

1.0.10 • Public • Published

next-fetch-with-response-type

Request middleware for responseType.

version license size download

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.

Package Sidebar

Install

npm i @jswork/next-fetch-with-response-type

Weekly Downloads

3

Version

1.0.10

License

MIT

Unpacked Size

5.61 kB

Total Files

5

Last publish

Collaborators

  • afeiship