MCPcopy Create free account
hub / github.com/Effect-TS/effect / getContentType

Function getContentType

packages/effect/src/http/HttpServerResponse.ts:196–205  ·  view source on GitHub ↗
(
  options: Options | undefined,
  headers: Headers.Headers
)

Source from the content-addressed store, hash-verified

194}
195
196const getContentType = (
197 options: Options | undefined,
198 headers: Headers.Headers
199): string | undefined => {
200 if (options?.contentType) {
201 return options.contentType
202 } else if (options?.headers) {
203 return headers["content-type"]
204 }
205}
206
207/**
208 * Creates an HTTP response whose body is a string.

Callers 7

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

Calls

no outgoing calls

Tested by

no test coverage detected