Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..


Server Response

An HTTP web response to be returned
function (Server Response) → equals(other : Server Response) returns Boolean
[beta] Indicates if both responses are the same instance.
function (Server Response) → header(name : String) returns String
[beta] Gets the value of a given header
function (Server Response) → header names returns Collection of String
[beta] Gets the names of the headers
function (Server Response) → is invalid returns Boolean
[beta] Returns true if the current instance is useless
function (Server Response) → post to wall
[beta] Displays the request to the wall
function (Server Response) → request returns Server Request
[beta] Gets the request associated to this response
function (Server Response) → set content(content : String)
[beta] Sets the content of the response
function (Server Response) → set content as buffer(bytes : Buffer)
[beta] Sets the content of the response as a binary buffer
function (Server Response) → set content as json(json : Json Object)
[beta] Sets the content of the response as the JSON tree
function (Server Response) → set content as xml(xml : Xml Object)
[beta] Sets the content of the response as the XML tree
function (Server Response) → set content type(type : String)
[beta] Sets the 'Content-Type' HTTP header; call after →set_content...
function (Server Response) → set header(name : String, value : String)
[beta] Sets an HTTP header value. Empty string clears the value
function (Server Response) → set status code(code : Number)
[beta] Sets the HTTP Status code of the response (defaults to 200)
function (Server Response) → status code returns Number
[beta] Gets the HTTP Status code of the response (defaults to 200)

edit this topic lofafoxccr