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

Function isJsonContentType

packages/plugins/graphql/src/sdk/invoke.ts:55–61  ·  view source on GitHub ↗
(ct: string | null | undefined)

Source from the content-addressed store, hash-verified

53// ---------------------------------------------------------------------------
54
55const isJsonContentType = (ct: string | null | undefined): boolean => {
56 if (!ct) return false;
57 const normalized = ct.split(";")[0]?.trim().toLowerCase() ?? "";
58 return (
59 normalized === "application/json" || normalized.includes("+json") || normalized.includes("json")
60 );
61};
62
63// ---------------------------------------------------------------------------
64// Public API — execute a GraphQL operation

Callers 1

invoke.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected