src/index.js
function json (opts) {
  return {
    ...opts,
    headers: {
      ...opts.headers,
      'content-type': 'application/json'
    },
    body: JSON.stringify(opts.body)
  }
}
function json (opts) {
  return {
    ...opts,
    headers: {
      ...opts.headers,
      'content-type': 'application/json'
    },
    body: JSON.stringify(opts.body)
  }
}
function json ( opts ) { return { ... opts , headers : { ... opts . headers , 'content-type' : 'application/json' } , body : JSON . stringify ( opts . body ) } }
Enhance a `fetch` options object to use a JSON body when sending data.
Enhance a fetch options object to use a JSON body when sending data .