Skip to content

ShokupanResponse

Defined in: src/response.ts:6

Custom response class to handle response state (headers, status) before the actual Response object is created.

new ShokupanResponse(): ShokupanResponse

ShokupanResponse

get hasPopulatedHeaders(): boolean

Defined in: src/response.ts:73

Internal: check if headers have been initialized/modified

boolean


get headers(): Headers

Defined in: src/response.ts:13

Get the current headers

Headers


get status(): number

Defined in: src/response.ts:21

Get the current status code

number

set status(code): void

Defined in: src/response.ts:28

Set the status code

number

void

append(key, value): ShokupanResponse

Defined in: src/response.ts:48

Append to a response header

string

Header name

string

Header value

ShokupanResponse


get(key): string

Defined in: src/response.ts:58

Get a response header value

string

Header name

string


has(key): boolean

Defined in: src/response.ts:66

Check if a header exists

string

Header name

boolean


set(key, value): ShokupanResponse

Defined in: src/response.ts:37

Set a response header

string

Header name

string

Header value

ShokupanResponse