MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / isJsonContentType

Function isJsonContentType

packages/plugins/openapi/src/sdk/invoke.ts:193–199  ·  view source on GitHub ↗
(ct: string | null | undefined)

Source from the content-addressed store, hash-verified

191 STREAMING_RESPONSE_CONTENT_TYPES.has(normalizeContentType(ct));
192
193const isJsonContentType = (ct: string | null | undefined): boolean => {
194 const normalized = normalizeContentType(ct);
195 if (!normalized) return false;
196 return (
197 normalized === "application/json" || normalized.includes("+json") || normalized.includes("json")
198 );
199};
200
201const isFormUrlEncoded = (ct: string | null | undefined): boolean =>
202 normalizeContentType(ct) === "application/x-www-form-urlencoded";

Callers 2

applyRequestBodyFunction · 0.70
invoke.tsFile · 0.70

Calls 1

normalizeContentTypeFunction · 0.85

Tested by

no test coverage detected