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

Function getContentType

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

Source from the content-addressed store, hash-verified

178}
179
180const getContentType = (
181 options: Options | undefined,
182 headers: Headers.Headers
183): string | undefined => {
184 if (options?.contentType) {
185 return options.contentType
186 } else if (options?.headers) {
187 return headers["content-type"]
188 }
189}
190
191/**
192 * 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