MCPcopy Create free account
hub / github.com/massCodeIO/massCode / getContentType

Function getContentType

src/main/ipc/handlers/http.ts:217–222  ·  view source on GitHub ↗
(headers: IncomingHttpHeaders)

Source from the content-addressed store, hash-verified

215}
216
217function getContentType(headers: IncomingHttpHeaders): string | undefined {
218 const value = headers['content-type']
219 if (Array.isArray(value))
220 return value[0]
221 return value
222}
223
224function asRecord(value: unknown): Record<string, unknown> | null {
225 return value !== null && typeof value === 'object'

Callers 1

executeHttpRequestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected