src/http/middleware/serialize-body.js
function serializeBody ({ decamelizeBody=true, headers, body }) {
  if (!body || !isJSONRequest(headers)) return
  const transformedBody = decamelizeBody ? decamelizeKeys(body) : body
  return {
    body: JSON.stringify(transformedBody)
  }
}
function serializeBody ({ decamelizeBody=true, headers, body }) {
  if (!body || !isJSONRequest(headers)) return
  const transformedBody = decamelizeBody ? decamelizeKeys(body) : body
  return {
    body: JSON.stringify(transformedBody)
  }
}
function serializeBody ( { decamelizeBody = true , headers , body } ) { if ( ! body || ! isJSONRequest ( headers ) ) return const transformedBody = decamelizeBody ? decamelizeKeys ( body ) : body return { body : JSON . stringify ( transformedBody ) } }
Serializes the request body if necessary
Serializes the request body if necessary