Response
Object Hierarchy:
Description:
public class Response :
Object
Represents the HTTP response after a request. This is generated by the Ambition engine and passed to a given controller and action.
Content:
Properties:
- public HashMap<string,string> headers { set; get; }
Additional dynamic headers to be sent in the HTTP response.
- public HashMap<string,Cookie> cookies { set; get; }
Additional dynamic cookies to be sent in the HTTP response.
- public int status { set; get; }
HTTP status code, defaulting to 200.
- public InputStream body_stream { set; get; }
Set response body to the provided InputStream. If the provided value
is not null, Ambition will not look for an array or string.
- public uint8[]? body_array { set; get; }
Set response body to a uint8 array. If body_stream is null, and this
value is not null, Ambition will not look for a string.
- public string body { set; get; }
Set response body to a string. If body_stream and body_array are not
null, the provided body will be set.
- public int64 body_stream_length { set; get; }
If body is provided as an InputStream, length is not calculated before
the request, and must be set manually.
- public string content_type { set; get; }
Content type of the response, defaults to "text/html".
Creation methods:
Methods:
Inherited Members:
All known members inherited from class GLib.Object