stein-fetch

11.2.2 • Public • Published

Fetch cursor

import fetch from 'stein-fetch'

// Create cursor using the same options as `fetch`
const fetchCursor = fetch(url, {
  headers: {
    'Content-Type': 'application/json',
  }
})

// Modify the request if desired
fetchCursor.setHeaders({
  ['x-some-header']: 'yep',  
})

// Call toJS to get the fetch result
const res = await fetchCursor.toJS()

Readme

Keywords

none

Package Sidebar

Install

npm i stein-fetch

Weekly Downloads

6

Version

11.2.2

License

MIT

Unpacked Size

13.2 kB

Total Files

12

Last publish

Collaborators

  • founderlab