- public const int COOKIE_MAX_AGE_ONE_DAY
A constant corresponding to 1 day.
- public const int COOKIE_MAX_AGE_ONE_HOUR
A constant corresponding to 1 hour.
- public const int COOKIE_MAX_AGE_ONE_WEEK
A constant corresponding to 1 week.
- public const int COOKIE_MAX_AGE_ONE_YEAR
A constant corresponding to 1 year.
- public const string FORM_MIME_TYPE_MULTIPART
A macro containing the value `multipart/form-data`; the MIME type used for
posting form data that contains files to be uploaded.
- public const string FORM_MIME_TYPE_URLENCODED
A macro containing the value `application/x-www-form-urlencoded`; the
default MIME type for POSTing HTML form data.
- public const int HSTS_POLICY_MAX_AGE_PAST
An expiration date that is always in the past.
- public const int HTTP_URI_FLAGS
- public const int MAJOR_VERSION
Like [func@get_major_version], but from the headers used at application
compile time, rather than from the library linked against at application run time.
- public const int MICRO_VERSION
Like [func@get_micro_version], but from the headers used at application
compile time, rather than from the library linked against at application run time.
- public const int MINOR_VERSION
Like [func@get_minor_version], but from the headers used at application
compile time, rather than from the library linked against at application run time.
- public const int VERSION_MIN_REQUIRED
A macro that should be defined by the user prior to including `libsoup.
- public bool check_version (uint major, uint minor, uint micro)
Like [func@CHECK_VERSION], but the check for soup_check_version is at
runtime instead of compile time.
- public Cookie? cookie_parse (string header, Uri? origin)
Parses header
and returns a
Cookie.
- public SList<Cookie> cookies_from_request (Message msg)
Parses msg
's Cookie request header and returns a [struct@GLib.
- public SList<Cookie> cookies_from_response (Message msg)
Parses msg
's Set-Cookie response headers and returns a [
struct@GLib.
- public string cookies_to_cookie_header (SList<Cookie> cookies)
Serializes a [struct@GLib.
- public void cookies_to_request (SList<Cookie> cookies, Message msg)
Adds the name and value of each cookie in cookies
to msg
's "Cookie" request.
- public void cookies_to_response (SList<Cookie> cookies, Message msg)
Appends a "Set-Cookie" response header to msg
for each cookie
in cookies
.
- public DateTime? date_time_new_from_http_string (string date_string)
Parses date_string
and tries to extract a date from it.
- public string date_time_to_string (DateTime date, DateFormat format)
Converts date
to a string in the format described by
format
.
- public uint get_major_version ()
Returns the major version number of the libsoup library.
- public uint get_micro_version ()
Returns the micro version number of the libsoup library.
- public uint get_minor_version ()
Returns the minor version number of the libsoup library.
- public bool header_contains (string header, string token)
Parses header
to see if it contains the token token
(matched case-insensitively).
- public void header_free_param_list (HashTable<string,string> param_list)
Frees param_list
.
- public void header_g_string_append_param (StringBuilder string, string name, string? value)
Appends something like `name=value` to string
, taking care to
quote value
if needed, and if so, to escape any quotes or backslashes in value
.
- public void header_g_string_append_param_quoted (StringBuilder string, string name, string value)
Appends something like `name="value"` to string
, taking care to
escape any quotes or backslashes in value
.
- public SList<string> header_parse_list (string header)
Parses a header whose content is described by RFC2616 as `something
`.
- public HashTable<string,string> header_parse_param_list (string header)
Parses a header which is a comma-delimited list of something like: `token [
"=" ( token | quoted-string ) ]`.
- public HashTable<string,string>? header_parse_param_list_strict (string header)
A strict version of [func@header_parse_param_list] that bails out if there
are duplicate parameters.
- public SList<string> header_parse_quality_list (string header, out SList<string> unacceptable)
Parses a header whose content is a list of items with optional "qvalue"s (
eg, Accept, Accept-Charset, Accept-Encoding, Accept-Language, TE).
- public HashTable<string,string> header_parse_semi_param_list (string header)
Parses a header which is a semicolon-delimited list of something like:
`token [ "=" ( token | quoted-string ) ]`.
- public HashTable<string,string>? header_parse_semi_param_list_strict (string header)
A strict version of [func@header_parse_semi_param_list] that bails out if
there are duplicate parameters.
- public bool headers_parse (string str, int len, MessageHeaders dest)
Parses the headers of an HTTP request or response in str
and
stores the results in dest
.
- public uint headers_parse_request (string str, int len, MessageHeaders req_headers, out string req_method, out string req_path, out HTTPVersion ver)
Parses the headers of an HTTP request in str
and stores the
results in req_method
, req_path
, ver
, and req_headers
.
- public bool headers_parse_response (string str, int len, MessageHeaders headers, out HTTPVersion ver, out uint status_code, out string reason_phrase)
Parses the headers of an HTTP response in str
and stores the
results in ver
, status_code
, reason_phrase
, and headers
.
- public bool headers_parse_status_line (string status_line, out HTTPVersion ver, out uint status_code, out string reason_phrase)
Parses the HTTP Status-Line string in status_line
into
ver
, status_code
, and reason_phrase
.
- public void message_headers_iter_init (out MessageHeadersIter iter, MessageHeaders hdrs)
- public Quark session_error_quark ()
- public unowned string status_get_phrase (uint status_code)
- public bool tld_domain_is_public_suffix (string domain)
Looks whether the domain
passed as argument is a public domain
suffix (.
- public Quark tld_error_quark ()
- public unowned string tld_get_base_domain (string hostname) throws Error
Finds the base domain for a given hostname
- public Uri uri_copy (Uri uri, ...)
As of 3.4.0 this will detect the default ports of HTTP(s) and WS(S) URIs
when copying and set it to the default port of the new scheme.
- public Bytes uri_decode_data_uri (string uri, out string? content_type)
Decodes the given data URI and returns its contents and content_type
.
- public bool uri_equal (Uri uri1, Uri uri2)
Tests whether or not uri1
and uri2
are equal in
all parts.
- public void websocket_client_prepare_handshake (Message msg, string? origin, string[]? protocols, GenericArray<TypeClass>? supported_extensions)
Adds the necessary headers to msg
to request a WebSocket
handshake including supported WebSocket extensions.
- public bool websocket_client_verify_handshake (Message msg, GenericArray<TypeClass>? supported_extensions, out List<WebsocketExtension> accepted_extensions) throws Error
Looks at the response status code and headers in msg
and
determines if they contain a valid WebSocket handshake response (given the handshake request in msg
's request headers).
- public Quark websocket_error_quark ()
- public bool websocket_server_check_handshake (ServerMessage msg, string? origin, string[]? protocols, GenericArray<TypeClass>? supported_extensions) throws Error
Examines the method and request headers in msg
and determines
whether msg
contains a valid handshake request.
- public bool websocket_server_process_handshake (ServerMessage msg, string? expected_origin, string[]? protocols, GenericArray<TypeClass>? supported_extensions, out List<WebsocketExtension> accepted_extensions)
Examines the method and request headers in msg
and (assuming
msg
contains a valid handshake request), fills in the handshake response.