Headers overview
Added in v1.0.0
Table of contents
combinators
get
Signature
export declare const get: {
(key: string): (self: Headers) => Option.Option<string>
(self: Headers, key: string): Option.Option<string>
}
Added in v1.0.0
has
Signature
export declare const has: { (key: string): (self: Headers) => boolean; (self: Headers, key: string): boolean }
Added in v1.0.0
merge
Signature
export declare const merge: {
(headers: Headers): (self: Headers) => Headers
(self: Headers, headers: Headers): Headers
}
Added in v1.0.0
redact
Signature
export declare const redact: {
(key: string | RegExp | ReadonlyArray<string | RegExp>): (self: Headers) => Record<string, string | Redacted.Redacted>
(self: Headers, key: string | RegExp | ReadonlyArray<string | RegExp>): Record<string, string | Redacted.Redacted>
}
Added in v1.0.0
remove
Signature
export declare const remove: { (key: string): (self: Headers) => Headers; (self: Headers, key: string): Headers }
Added in v1.0.0
set
Signature
export declare const set: {
(key: string, value: string): (self: Headers) => Headers
(self: Headers, key: string, value: string): Headers
}
Added in v1.0.0
setAll
Signature
export declare const setAll: { (headers: Input): (self: Headers) => Headers; (self: Headers, headers: Input): Headers }
Added in v1.0.0
constructors
empty
Signature
export declare const empty: Headers
Added in v1.0.0
fromInput
Signature
export declare const fromInput: (input?: Input) => Headers
Added in v1.0.0
unsafeFromRecord
Signature
export declare const unsafeFromRecord: (input: Record.ReadonlyRecord<string, string>) => Headers
Added in v1.0.0
fiber refs
currentRedactedNames
Signature
export declare const currentRedactedNames: any
Added in v1.0.0
models
Headers (interface)
Signature
export interface Headers {
readonly [HeadersTypeId]: HeadersTypeId
readonly [key: string]: string
}
Added in v1.0.0
Input (type alias)
Signature
export type Input =
| Record.ReadonlyRecord<string, string | ReadonlyArray<string> | undefined>
| Iterable<readonly [string, string]>
Added in v1.0.0
refinements
isHeaders
Signature
export declare const isHeaders: (u: unknown) => u is Headers
Added in v1.0.0
schemas
schema
Signature
export declare const schema: Schema.Schema<Headers, Record.ReadonlyRecord<string, string | readonly string[]>>
Added in v1.0.0
schemaFromSelf
Signature
export declare const schemaFromSelf: Schema.Schema<Headers>
Added in v1.0.0
type ids
HeadersTypeId
Signature
export declare const HeadersTypeId: typeof HeadersTypeId
Added in v1.0.0
HeadersTypeId (type alias)
Signature
export type HeadersTypeId = typeof HeadersTypeId
Added in v1.0.0