MCPcopy
hub / github.com/Effect-TS/effect / getContentType

Function getContentType

packages/platform/src/internal/httpServerResponse.ts:330–341  ·  view source on GitHub ↗
(
  options: ServerResponse.Options | undefined,
  headers: Headers.Headers
)

Source from the content-addressed store, hash-verified

328
329/** @internal */
330export const getContentType = (
331 options: ServerResponse.Options | undefined,
332 headers: Headers.Headers
333): string | undefined => {
334 if (options?.contentType) {
335 return options.contentType
336 } else if (options?.headers) {
337 return headers["content-type"]
338 } else {
339 return
340 }
341}
342
343/** @internal */
344export const setHeader = dual<

Callers 7

uint8ArrayFunction · 0.85
textFunction · 0.85
jsonFunction · 0.85
unsafeJsonFunction · 0.85
schemaJsonFunction · 0.85
urlParamsFunction · 0.85
streamFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…