Skip to content

Taxum / @taxum/core / http / HttpResponseBuilder

Class: HttpResponseBuilder

Defined in: http/response.ts:149

Builder for creating HTTP responses.

Constructors

Constructor

new HttpResponseBuilder(): HttpResponseBuilder

Returns

HttpResponseBuilder

Methods

body()

body(body): HttpResponse

Defined in: http/response.ts:184

Parameters

body

BodyLike

Returns

HttpResponse


extension()

extension<T>(key, value): this

Defined in: http/response.ts:179

Type Parameters

T

T

Parameters

key

ExtensionKey<T>

value

T

Returns

this


extensions()

extensions(extensions): this

Defined in: http/response.ts:174

Parameters

extensions

Extensions

Returns

this


header(key, value): this

Defined in: http/response.ts:169

Parameters

key

string

value

string

Returns

this


headers()

headers(headers): this

Defined in: http/response.ts:164

Parameters

headers

HeaderMap

Returns

this


status()

status(status): this

Defined in: http/response.ts:154

Parameters

status

number | StatusCode

Returns

this