Request
Object Hierarchy:
Description:
Request representing a request of a resource.
Namespace: VSGI
Package: vsgi-0.3
Content:
Constants:
- public const string CONNECT
- public const string DELETE
- public const string GET
- public const string HEAD
- public const (unowned string)[] METHODS
List of all supported HTTP methods.
- public const string OPTIONS
HTTP/1.1 standard methods.
- public const string PATCH
PATCH method defined in RFC5789.
- public const string POST
- public const string PUT
- public const string TRACE
Properties:
- public InputStream body { get; }
Request body.
- public Connection connection { get; construct; }
Connection containing raw streams.
- public SList<Cookie> cookies { owned get; }
Request cookies extracted from the 'Cookie' header.
- public abstract string gateway_interface { owned get; }
Identifier for the gateway (eg. CGI/1.1).
- public MessageHeaders headers { get; protected set construct; }
Request headers.
- public abstract HTTPVersion http_version { get; }
Request HTTP version.
- public abstract string method { owned get; }
Request HTTP method
- public abstract HashTable<string,string>? query { get; }
HTTP query parsed if encoded according to percent-encoding, otherwise it must be interpreted from VSGI.Request.uri
- public abstract URI uri { get; }
Request URI.
Creation methods:
- public Request ()
Methods:
- public void convert (Converter converter, int64 content_length = -1)
Apply a converter to the request body.
- public virtual uint8[] flatten (Cancellable? cancellable = null) throws IOError
Flatten the request body in a buffer.
- public virtual async uint8[] flatten_async (int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
Buffer the body stream asynchronously.
- public Bytes flatten_bytes (Cancellable? cancellable = null) throws IOError
Flatten the request body as a GLib.Bytes.
- public async Bytes flatten_bytes_async (int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
- public string flatten_utf8 (Cancellable? cancellable = null) throws IOError
Flatten the request body as a 'UTF-8' string.
- public async string flatten_utf8_async (int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
- public Cookie? lookup_cookie (string name)
Lookup a cookie using its name.
- public string? lookup_query (string key)
Lookup a key in the request query.
- public Cookie? lookup_signed_cookie (string name, ChecksumType checksum_type, uint8[] key, out string? value)
Lookup a signed cookie using its name.
Fields:
- protected InputStream? _body
Placeholder for the request body.
Inherited Members:
All known members inherited from class GLib.Object