Skip to content

ResponseHeadersBuilder

[Source]

Header construction phase of ResponseBuilder.

Add headers with add_header(), then call finish_headers() to transition to the body phase. Headers are serialized in the order they are added.

interface ref ResponseHeadersBuilder

Public Functions

add_header

[Source]

Add a header to the response.

Headers are written in the order added. The caller is responsible for setting any required headers (including Content-Length).

fun ref add_header(
  name: String val,
  value: String val)
: ResponseHeadersBuilder ref

Parameters

Returns


finish_headers

[Source]

Finish the header section and transition to the body phase.

Writes the blank line that separates headers from the body.

fun ref finish_headers()
: ResponseBodyBuilder ref

Returns