MCPcopy Index your code
hub / github.com/APIParkLab/APIPark / isJsonHttp

Function isJsonHttp

frontend/packages/common/src/hooks/http.ts:83–86  ·  view source on GitHub ↗
(headers: Headers | { [k: string]: string })

Source from the content-addressed store, hash-verified

81}
82
83function isJsonHttp(headers: Headers | { [k: string]: string }): boolean {
84 const contentType = headers instanceof Headers ? headers.get('Content-Type') : headers['Content-Type']
85 return contentType?.includes('application/json') ?? false
86}
87
88const trimStringValuesInObject = (obj: unknown): unknown => {
89 if (typeof obj === 'string') {

Callers 2

processRequestBodyFunction · 0.85
fetchDataFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected