v2026.2.1
All Bundles

Response

Web server response

Operations

AddCookie

Adds a cookie

method : public : AddCookie(cookie:Cookie) ~ Nil

Parameters

NameTypeDescription
cookieCookiecookie

GetCode

Get the response code

method : public : GetCode() ~ Int

Return

TypeDescription
Intresponse code

GetContent

Get the response content

method : public : GetContent() ~ Byte[]

Return

TypeDescription
Byteresponse content

GetCookie

Updates a cookie

method : public : GetCookie(name:String) ~ Cookie

Parameters

NameTypeDescription
nameStringcookie name

GetCookies

Gets all cookies

method : public : GetCookies() ~ Vector<Cookie>

Return

TypeDescription
Vector<Cookie>all cookies

GetForwardAlias

Gets the forward page alias

method : public : GetForwardAlias() ~ String

Return

TypeDescription
Stringforward page alias

GetHeader

Gets a response header

method : public : GetHeader(name:String) ~ String

Parameters

NameTypeDescription
nameStringheader name

Return

TypeDescription
Stringresponse header

GetHeaders

Gets response headers

method : public : GetHeaders() ~ Map<String,String>

Return

TypeDescription
Map<String,String>response headers

GetReason

Get the reason string

method : public : GetReason() ~ String

Return

TypeDescription
Stringreason sting

GetStringContent

Get the response content as string

method : public : GetStringContent() ~ String

Return

TypeDescription
Stringresponse content as string

HasContent

Checks for request body content

method : public : HasContent() ~ Bool

Return

TypeDescription
Booltrue if content exists, false otherwise

HasForwardAlias

Checks the forward page alias

method : public : HasForwardAlias() ~ Bool

Return

TypeDescription
Booltrue if forward page alias exists, false otherwise

HasHeader

Check for a response header

method : public : HasHeader(name:String) ~ Bool

Parameters

NameTypeDescription
nameStringheader name

Return

TypeDescription
Booltrue if header exists, false otherwise

HasStaticHandler

Check to see if the response has configured handler

method : public : HasStaticHandler() ~ Bool

Return

TypeDescription
Booltrue if handler exists, false otherwise

New

Constructor

New(server_config:WebServerConfig, request_path:String)

Parameters

NameTypeDescription
server_configWebServerConfigweb server configuration
request_pathStringHTTP request path

RemoveCookie

Removes a cookie

method : public : RemoveCookie(name:String) ~ Nil

Parameters

NameTypeDescription
nameStringcookie name

RemoveHeader

Removed a response header

method : public : RemoveHeader(name:String) ~ Nil

Parameters

NameTypeDescription
nameStringheader name

SetCode

Set response code

method : public : SetCode(code:Int) ~ Nil

Parameters

NameTypeDescription
codeIntresponse code

SetCodeContent

Set response code and content

method : public : SetCodeContent(code:Int, content:Byte[]) ~ Nil

Parameters

NameTypeDescription
codeIntresponse code
contentByteresponse content

SetCodeContent

Set response code and content

method : public : SetCodeContent(code:Int, content:String) ~ Nil

Parameters

NameTypeDescription
codeIntresponse code
contentStringresponse content

SetCodeContentCompression

Set response code, content and compression type

method : public : SetCodeContentCompression(code:Int, content:String, compression:Compression) ~ Nil

Parameters

NameTypeDescription
codeIntresponse code
contentStringresponse content
compressionCompressionresponse compression (br = Brotli, deflate = zlib, gzip = GNU zip)

SetCodeContentCompression

Set response code, content and compression type

method : public : SetCodeContentCompression(code:Int, content:Byte[], compression:Compression) ~ Nil

Parameters

NameTypeDescription
codeIntresponse code
contentByteresponse content
compressionCompressionresponse compression (br = Brotli, deflate = zlib, gzip = GNU zip)

SetCodeType

Set response code and type

method : public : SetCodeType(code:Int, type:String) ~ Nil

Parameters

NameTypeDescription
codeIntresponse code
typeStringcontent type

SetCodeTypeContent

Set response code, type and content

method : public : SetCodeTypeContent(code:Int, type:String, content:Byte[]) ~ Nil

Parameters

NameTypeDescription
codeIntresponse code
typeStringcontent type
contentByteresponse content

SetCodeTypeContent

Set response code and content

method : public : SetCodeTypeContent(code:Int, type:String, content:String) ~ Nil

Parameters

NameTypeDescription
codeIntresponse code
typeStringcontent type
contentStringresponse content

SetCompression

Set the response compression, should be called after the content is set

method : public : SetCompression(compression:Compression) ~ Nil

Parameters

NameTypeDescription
compressionCompressionresponse compression (br = Brotli, deflate = zlib, gzip = GNU zip)

SetContent

Set response content

method : public : SetContent(content:Byte[]) ~ Nil

Parameters

NameTypeDescription
contentByteresponse content

SetContent

Set response code

method : public : SetContent(content:String) ~ Nil

Parameters

NameTypeDescription
contentStringresponse content

SetContentCompression

Set content and compression type

method : public : SetContentCompression(content:String, compression:Compression) ~ Nil

Parameters

NameTypeDescription
contentStringresponse content
compressionCompressionresponse compression (br = Brotli, deflate = zlib, gzip = GNU zip)

SetContentCompression

Set content and compression type

method : public : SetContentCompression(content:Byte[], compression:Compression) ~ Nil

Parameters

NameTypeDescription
contentByteresponse content
compressionCompressionresponse compression (br = Brotli, deflate = zlib, gzip = GNU zip)

SetContentType

Sets the content type

method : public : SetContentType(type:String) ~ Nil

Parameters

NameTypeDescription
typeStringcontent type

SetForwardAlias

Set the forward page alias

method : public : SetForwardAlias(name:String) ~ Bool

Parameters

NameTypeDescription
nameStringforward page alias

Return

TypeDescription
Booltrue if set, false otherwise

SetHeader

Sets a response header

method : public : SetHeader(name:String, value:String) ~ Nil

Parameters

NameTypeDescription
nameStringheader name
valueStringheader value

SetReason

Set response reason

method : public : SetReason(reason:String) ~ Nil

Parameters

NameTypeDescription
reasonStringresponse reason

ToString

Get the reason string

method : public : ToString() ~ String

Return

TypeDescription
Stringreason sting