Request
Object Hierarchy:
Description:
[ Version ( since = "0.1" ) ]
public abstract class Request : Object
Request representing a request of a resource.
Content:
Constants:
- public const unowned string OPTIONS
HTTP/1.1 standard methods.
- public const unowned string GET
- public const unowned string HEAD
- public const unowned string POST
- public const unowned string PUT
- public const unowned string DELETE
- public const unowned string TRACE
- public const unowned string CONNECT
- public const unowned string PATCH
PATCH method defined in RFC5789.
- public const unowned (unowned string)[] METHODS
List of all supported HTTP methods.
Properties:
- public Connection connection { construct; get; }
Connection containing raw streams.
- public abstract HTTPVersion http_version { get; }
Request HTTP version.
- public abstract string gateway_interface { owned get; }
Identifier for the gateway (eg. CGI/1.1).
- public abstract string method { owned get; }
Request HTTP method
- public abstract URI uri { get; }
Request URI.
- 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 MessageHeaders headers { protected construct set; get; }
Request headers.
- public SList<Cookie> cookies { owned get; }
Request cookies extracted from the 'Cookie' header.
- public InputStream body { get; }
Request body.
Creation methods:
Methods:
- public string? lookup_query (string key)
Lookup a key in the request query.
- public Cookie? lookup_cookie (string name)
Lookup a cookie using its name.
- public Cookie? lookup_signed_cookie (string name, ChecksumType checksum_type, uint8[] key, out string? value)
Lookup a signed cookie using its name.
- 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 Bytes flatten_bytes (Cancellable? cancellable = null) throws IOError
Flatten the request body as a GLib.Bytes.
- public string flatten_utf8 (Cancellable? cancellable = null) throws IOError
Flatten the request body as a 'UTF-8' string.
- public virtual async uint8[] flatten_async (int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
Buffer the body stream asynchronously.
- public async Bytes flatten_bytes_async (int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
- public async string flatten_utf8_async (int io_priority = DEFAULT, Cancellable? cancellable = null) throws IOError
Fields:
Inherited Members:
All known members inherited from class GLib.Object
- @new
- new_valist
- newv
- new_with_properties
- add_toggle_ref
- add_weak_pointer
- bind_property
- connect
- constructed
- disconnect
- dispose
- dup_data
- dup_qdata
- freeze_notify
- @get
- get_class
- get_data
- get_property
- get_qdata
- get_type
- getv
- notify_property
- @ref
- ref_sink
- replace_data
- replace_qdata
- remove_toggle_ref
- remove_weak_pointer
- @set
- set_data
- set_data_full
- set_property
- set_qdata
- set_qdata_full
- setv
- steal_data
- steal_qdata
- thaw_notify
- unref
- watch_closure
- weak_ref
- weak_unref
- notify
- ref_count