MCPcopy
hub / github.com/nock/nock / isJSONContent

Function isJSONContent

lib/common.js:113–117  ·  view source on GitHub ↗

* @param {Headers} headers

(headers)

Source from the content-addressed store, hash-verified

111 * @param {Headers} headers
112 */
113function isJSONContent(headers) {
114 // https://tools.ietf.org/html/rfc8259
115 const contentType = String(headers.get('content-type') || '').toLowerCase()
116 return contentType.startsWith('application/json')
117}
118
119/**
120 * Return a new object with all field names of the headers lower-cased.

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…