import { DaffSsrResponse } from '@daffodil/ssr'
The document response for a server-side render.
interface DaffSsrResponse {
get(header: string): Array<string> | string
set(
name: string
value: string | string[]
): void
append(
name: string
value: string | string[]
): void
status(code: number): void
}
Array | string Get the value of a header by name.
| Parameter | header: string |
|---|---|
| Description |
voidSet a header to a particular value. Removes all existing headers of this name.
| Parameter | name: string |
|---|---|
| Description |
| Parameter | value: string | string[] |
|---|---|
| Description |
voidAppend a header to the response, preserving the existing headers.
| Parameter | name: string |
|---|---|
| Description |
| Parameter | value: string | string[] |
|---|---|
| Description |
voidSet the status code of the response.
| Parameter | code: number |
|---|---|
| Description |