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

Function headers

packages/platform/browser/src/BrowserHttpClient.ts:227–239  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

225 private _rawHeaders: Record<string, string | Array<string>> | undefined
226 private _headers: Headers.Headers | undefined
227 get headers() {
228 if (this._headers) {
229 return this._headers
230 }
231 if (this._rawHeaderString === "") {
232 return this._headers = Headers.empty
233 }
234 const parser = HeaderParser.make()
235 const result = parser(encoder.encode(this._rawHeaderString + "\r\n"), 0)
236 this._rawHeaders = result._tag === "Headers" ? result.headers : undefined
237 const parsed = result._tag === "Headers" ? Headers.fromInput(result.headers) : Headers.empty
238 return this._headers = parsed
239 }
240
241 cachedCookies: Cookies.Cookies | undefined
242 get cookies() {

Callers

nothing calls this directly

Calls 1

makeMethod · 0.65

Tested by

no test coverage detected