soup.global

Undocumented in source.

Members

Functions

checkVersion
bool checkVersion(uint major, uint minor, uint micro)

Like funcCHECK_VERSION, but the check for soup_check_version is at runtime instead of compile time.

cookiesFromRequest
soup.cookie.Cookie[] cookiesFromRequest(soup.message.Message msg)

Parses msg's Cookie request header and returns a glib.slist.SList of soup.cookie.Cookies.

cookiesFromResponse
soup.cookie.Cookie[] cookiesFromResponse(soup.message.Message msg)

Parses msg's Set-Cookie response headers and returns a glib.slist.SList of soup.cookie.Cookies.

cookiesToCookieHeader
string cookiesToCookieHeader(soup.cookie.Cookie[] cookies)

Serializes a glib.slist.SList of #SoupCookie into a string suitable for setting as the value of the "Cookie" header.

cookiesToRequest
void cookiesToRequest(soup.cookie.Cookie[] cookies, soup.message.Message msg)

Adds the name and value of each cookie in cookies to msg's "Cookie" request.

cookiesToResponse
void cookiesToResponse(soup.cookie.Cookie[] cookies, soup.message.Message msg)

Appends a "Set-Cookie" response header to msg for each cookie in cookies.

dateTimeNewFromHttpString
glib.date_time.DateTime dateTimeNewFromHttpString(string dateString)

Parses date_string and tries to extract a date from it.

dateTimeToString
string dateTimeToString(glib.date_time.DateTime date, soup.types.DateFormat format)

Converts date to a string in the format described by format.

formDecode
string[string] formDecode(string encodedForm)

Decodes form.

formDecodeMultipart
string[string] formDecodeMultipart(soup.multipart.Multipart multipart, string fileControlName, string filename, string contentType, glib.bytes.Bytes file)

Decodes the "multipart/form-data" request in multipart.

formEncodeHash
string formEncodeHash(string[string] formDataSet)

Encodes form_data_set into a value of type "application/x-www-form-urlencoded".

getMajorVersion
uint getMajorVersion()

Returns the major version number of the libsoup library.

getMicroVersion
uint getMicroVersion()

Returns the micro version number of the libsoup library.

getMinorVersion
uint getMinorVersion()

Returns the minor version number of the libsoup library.

headerContains
bool headerContains(string header, string token)

Parses header to see if it contains the token token (matched case-insensitively).

headerFreeParamList
void headerFreeParamList(string[string] paramList)

Frees param_list.

headerGStringAppendParam
void headerGStringAppendParam(glib.string_.String 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.

headerGStringAppendParamQuoted
void headerGStringAppendParamQuoted(glib.string_.String string_, string name, string value)

Appends something like name="value" to string, taking care to escape any quotes or backslashes in value.

headerParseList
string[] headerParseList(string header)

Parses a header whose content is described by RFC2616 as #something.

headerParseParamList
string[string] headerParseParamList(string header)

Parses a header which is a comma-delimited list of something like: token [ "=" ( token | quoted-string ) ].

headerParseParamListStrict
string[string] headerParseParamListStrict(string header)

A strict version of funcheader_parse_param_list that bails out if there are duplicate parameters.

headerParseQualityList
string[] headerParseQualityList(string header, 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).

headerParseSemiParamList
string[string] headerParseSemiParamList(string header)

Parses a header which is a semicolon-delimited list of something like: token [ "=" ( token | quoted-string ) ].

headerParseSemiParamListStrict
string[string] headerParseSemiParamListStrict(string header)

A strict version of funcheader_parse_semi_param_list that bails out if there are duplicate parameters.

headersParse
bool headersParse(string str, int len, soup.message_headers.MessageHeaders dest)

Parses the headers of an HTTP request or response in str and stores the results in dest.

headersParseRequest
uint headersParseRequest(string str, int len, soup.message_headers.MessageHeaders reqHeaders, string reqMethod, string reqPath, soup.types.HTTPVersion ver)

Parses the headers of an HTTP request in str and stores the results in req_method, req_path, ver, and req_headers.

headersParseResponse
bool headersParseResponse(string str, int len, soup.message_headers.MessageHeaders headers, soup.types.HTTPVersion ver, uint statusCode, string reasonPhrase)

Parses the headers of an HTTP response in str and stores the results in ver, status_code, reason_phrase, and headers.

headersParseStatusLine
bool headersParseStatusLine(string statusLine, soup.types.HTTPVersion ver, uint statusCode, string reasonPhrase)

Parses the HTTP Status-Line string in status_line into ver, status_code, and reason_phrase.

tldDomainIsPublicSuffix
bool tldDomainIsPublicSuffix(string domain)

Looks whether the domain passed as argument is a public domain suffix (.org, .com, .co.uk, etc) or not.

tldGetBaseDomain
string tldGetBaseDomain(string hostname)

Finds the base domain for a given hostname

uriDecodeDataUri
glib.bytes.Bytes uriDecodeDataUri(string uri, string contentType)

Decodes the given data URI and returns its contents and content_type.

uriEqual
bool uriEqual(glib.uri.Uri uri1, glib.uri.Uri uri2)

Tests whether or not uri1 and uri2 are equal in all parts.