Import line: | Soup = imports.gi.Soup; |
GIR File: | Soup-2.4.gir |
C documentation: | Soup |
Namespace : | Soup |
Properties | |
---|---|
gint32 Soup.ADDRESS_ANY_PORT : 0
|
|
String Soup.ADDRESS_FAMILY : null
|
|
String Soup.ADDRESS_NAME : null
|
|
String Soup.ADDRESS_PHYSICAL : null
|
|
String Soup.ADDRESS_PORT : null
|
|
String Soup.ADDRESS_SOCKADDR : null
|
|
String Soup.AUTH_DOMAIN_ADD_PATH : null
|
|
String Soup.AUTH_DOMAIN_BASIC_AUTH_CALLBACK : null
|
|
String Soup.AUTH_DOMAIN_BASIC_AUTH_DATA : null
|
|
gint32 Soup.AUTH_DOMAIN_BASIC_H : 0
|
|
String Soup.AUTH_DOMAIN_DIGEST_AUTH_CALLBACK : null
|
|
String Soup.AUTH_DOMAIN_DIGEST_AUTH_DATA : null
|
|
gint32 Soup.AUTH_DOMAIN_DIGEST_H : 0
|
|
String Soup.AUTH_DOMAIN_FILTER : null
|
|
String Soup.AUTH_DOMAIN_FILTER_DATA : null
|
|
String Soup.AUTH_DOMAIN_GENERIC_AUTH_CALLBACK : null
|
|
String Soup.AUTH_DOMAIN_GENERIC_AUTH_DATA : null
|
|
gint32 Soup.AUTH_DOMAIN_H : 0
|
|
String Soup.AUTH_DOMAIN_PROXY : null
|
|
String Soup.AUTH_DOMAIN_REALM : null
|
|
String Soup.AUTH_DOMAIN_REMOVE_PATH : null
|
|
gint32 Soup.AUTH_H : 0
|
|
String Soup.AUTH_HOST : null
|
|
String Soup.AUTH_IS_AUTHENTICATED : null
|
|
String Soup.AUTH_IS_FOR_PROXY : null
|
|
String Soup.AUTH_REALM : null
|
|
String Soup.AUTH_SCHEME_NAME : null
|
|
gint32 Soup.CACHE_H : 0
|
|
gint32 Soup.CHAR_HTTP_CTL : 0
|
|
gint32 Soup.CHAR_HTTP_SEPARATOR : 0
|
|
gint32 Soup.CHAR_URI_GEN_DELIMS : 0
|
|
gint32 Soup.CHAR_URI_PERCENT_ENCODED : 0
|
|
gint32 Soup.CHAR_URI_SUB_DELIMS : 0
|
|
gint32 Soup.CONTENT_DECODER_H : 0
|
|
gint32 Soup.CONTENT_SNIFFER_H : 0
|
|
gint32 Soup.COOKIE_H : 0
|
|
String Soup.COOKIE_JAR_ACCEPT_POLICY : null
|
|
gint32 Soup.COOKIE_JAR_H : 0
|
|
String Soup.COOKIE_JAR_READ_ONLY : null
|
|
String Soup.COOKIE_JAR_TEXT_FILENAME : null
|
|
gint32 Soup.COOKIE_JAR_TEXT_H : 0
|
|
gint32 Soup.COOKIE_MAX_AGE_ONE_DAY : 0
|
|
gint32 Soup.COOKIE_MAX_AGE_ONE_HOUR : 0
|
|
gint32 Soup.COOKIE_MAX_AGE_ONE_WEEK : 0
|
|
gint32 Soup.COOKIE_MAX_AGE_ONE_YEAR : 0
|
|
gint32 Soup.DATE_H : 0
|
|
gint32 Soup.FORM_H : 0
|
|
String Soup.FORM_MIME_TYPE_MULTIPART : null
|
|
String Soup.FORM_MIME_TYPE_URLENCODED : null
|
|
gint32 Soup.HEADERS_H : 0
|
|
gint32 Soup.LOGGER_H : 0
|
|
gint32 Soup.MESSAGE_BODY_H : 0
|
|
String Soup.MESSAGE_FIRST_PARTY : null
|
|
String Soup.MESSAGE_FLAGS : null
|
|
gint32 Soup.MESSAGE_H : 0
|
|
gint32 Soup.MESSAGE_HEADERS_H : 0
|
|
String Soup.MESSAGE_HTTP_VERSION : null
|
|
String Soup.MESSAGE_METHOD : null
|
|
String Soup.MESSAGE_REASON_PHRASE : null
|
|
String Soup.MESSAGE_REQUEST_BODY : null
|
|
String Soup.MESSAGE_REQUEST_HEADERS : null
|
|
String Soup.MESSAGE_RESPONSE_BODY : null
|
|
String Soup.MESSAGE_RESPONSE_HEADERS : null
|
|
String Soup.MESSAGE_SERVER_SIDE : null
|
|
String Soup.MESSAGE_STATUS_CODE : null
|
|
String Soup.MESSAGE_TLS_CERTIFICATE : null
|
|
String Soup.MESSAGE_TLS_ERRORS : null
|
|
String Soup.MESSAGE_URI : null
|
|
gint32 Soup.METHOD_H : 0
|
|
gint32 Soup.MISC_H : 0
|
|
gint32 Soup.MULTIPART_H : 0
|
|
gint32 Soup.PASSWORD_MANAGER_H : 0
|
|
gint32 Soup.PROXY_RESOLVER_DEFAULT_H : 0
|
|
gint32 Soup.PROXY_RESOLVER_H : 0
|
|
gint32 Soup.PROXY_URI_RESOLVER_H : 0
|
|
gint32 Soup.REQUESTER_H : 0
|
|
gint32 Soup.REQUEST_DATA_H : 0
|
|
gint32 Soup.REQUEST_FILE_H : 0
|
|
gint32 Soup.REQUEST_H : 0
|
|
gint32 Soup.REQUEST_HTTP_H : 0
|
|
String Soup.REQUEST_SESSION : null
|
|
String Soup.REQUEST_URI : null
|
|
String Soup.SERVER_ASYNC_CONTEXT : null
|
|
gint32 Soup.SERVER_H : 0
|
|
String Soup.SERVER_INTERFACE : null
|
|
String Soup.SERVER_PORT : null
|
|
String Soup.SERVER_RAW_PATHS : null
|
|
String Soup.SERVER_SERVER_HEADER : null
|
|
String Soup.SERVER_SSL_CERT_FILE : null
|
|
String Soup.SERVER_SSL_KEY_FILE : null
|
|
String Soup.SESSION_ACCEPT_LANGUAGE : null
|
|
String Soup.SESSION_ACCEPT_LANGUAGE_AUTO : null
|
|
String Soup.SESSION_ADD_FEATURE : null
|
|
String Soup.SESSION_ADD_FEATURE_BY_TYPE : null
|
|
String Soup.SESSION_ASYNC_CONTEXT : null
|
|
gint32 Soup.SESSION_ASYNC_H : 0
|
|
gint32 Soup.SESSION_FEATURE_H : 0
|
|
gint32 Soup.SESSION_H : 0
|
|
String Soup.SESSION_IDLE_TIMEOUT : null
|
|
String Soup.SESSION_MAX_CONNS : null
|
|
String Soup.SESSION_MAX_CONNS_PER_HOST : null
|
|
String Soup.SESSION_PROXY_URI : null
|
|
String Soup.SESSION_REMOVE_FEATURE_BY_TYPE : null
|
|
String Soup.SESSION_SSL_CA_FILE : null
|
|
String Soup.SESSION_SSL_STRICT : null
|
|
gint32 Soup.SESSION_SYNC_H : 0
|
|
String Soup.SESSION_TIMEOUT : null
|
|
String Soup.SESSION_USER_AGENT : null
|
|
String Soup.SESSION_USE_NTLM : null
|
|
String Soup.SOCKET_ASYNC_CONTEXT : null
|
|
String Soup.SOCKET_FLAG_NONBLOCKING : null
|
|
gint32 Soup.SOCKET_H : 0
|
|
String Soup.SOCKET_IS_SERVER : null
|
|
String Soup.SOCKET_LOCAL_ADDRESS : null
|
|
String Soup.SOCKET_REMOTE_ADDRESS : null
|
|
String Soup.SOCKET_SSL_CREDENTIALS : null
|
|
String Soup.SOCKET_SSL_STRICT : null
|
|
String Soup.SOCKET_TIMEOUT : null
|
|
String Soup.SOCKET_TLS_CERTIFICATE : null
|
|
String Soup.SOCKET_TLS_ERRORS : null
|
|
String Soup.SOCKET_TRUSTED_CERTIFICATE : null
|
|
gint32 Soup.STATUS_H : 0
|
|
gint32 Soup.TYPES_H : 0
|
|
gint32 Soup.URI_H : 0
|
|
gint32 Soup.VALUE_UTILS_H : 0
|
|
gint32 Soup.XMLRPC_H : 0
|
None |
Method / Constructor | Defined By | |
---|---|---|
Parses header and returns a SoupCookie.
Parses header and returns a SoupCookie. (If header contains
multiple cookies, only the first one will be parsed.) If header does not have "path" or "domain" attributes, they will be defaulted from origin. If origin is NULL, path will default to "/", but domain will be left as NULL. Note that this is not a valid state for a SoupCookie, and you will need to fill in some appropriate string for the domain if you want to actually make use of the cookie. parsed, or contained an illegal "domain" attribute for a cookie originating from origin.
|
Soup | |
Parses msg's Cookie request header and returns a GSList of
SoupCookies.
Parses msg's Cookie request header and returns a GSList of
SoupCookies. As the "Cookie" header, unlike "Set-Cookie", only contains cookie names and values, none of the other SoupCookie fields will be filled in. (Thus, you can't generally pass a cookie returned from this method directly to soup_cookies_to_response().) of SoupCookies, which can be freed with soup_cookies_free().
|
Soup | |
Parses msg's Set-Cookie response headers and returns a GSList of
SoupCookies.
Parses msg's Set-Cookie response headers and returns a GSList of
SoupCookies. Cookies that do not specify "path" or "domain" attributes will have their values defaulted from msg. of SoupCookies, which can be freed with soup_cookies_free().
|
Soup | |
Serializes a GSList of SoupCookie into a string suitable for
setting as the value of the "Cookie" header. |
Soup | |
Adds the name and value of each cookie in cookies to msg's
"Cookie" request.
Adds the name and value of each cookie in cookies to msg's
"Cookie" request. (If msg already has a "Cookie" request header, these cookies will be appended to the cookies already present. Be careful that you do not append the same cookies twice, eg, when requeuing a message.)
|
Soup | |
Appends a "Set-Cookie" response header to msg for each cookie in
Appends a "Set-Cookie" response header to msg for each cookie in
|
Soup | |
Decodes form, which is an urlencoded dataset as defined in the
HTML 4.01 spec.
Decodes form, which is an urlencoded dataset as defined in the
HTML 4.01 spec. table containing the name/value pairs from encoded_form, which you can free with g_hash_table_destroy().
|
Soup | |
Decodes the "multipart/form-data" request in msg; this is a
convenience method for the case when you have a single file upload control in a form.
Decodes the "multipart/form-data" request in msg; this is a
convenience method for the case when you have a single file upload control in a form. (Or when you don't have any file upload controls, but are still using "multipart/form-data" anyway.) Pass the name of the file upload control in file_control_name, and soup_form_decode_multipart() will extract the uploaded file data into filename, content_type, and file. All of the other form control data will be returned (as strings, as with soup_form_decode()) in the returned GHashTable. You may pass NULL for filename and/or content_type if you do not care about those fields. soup_form_decode_multipart() may also return NULL in those fields if the client did not provide that information. You must free the returned filename and content-type with g_free(), and the returned file data with soup_buffer_free(). If you have a form with more than one file upload control, you will need to decode it manually, using soup_multipart_new_from_message() and soup_multipart_get_part(). table containing the name/value pairs (other than g_hash_table_destroy(). On error, it will return NULL.
|
Soup | |
Encodes form_data_set into a value of type
"application/x-www-form-urlencoded", as defined in the HTML 4.01 spec.
Encodes form_data_set into a value of type
"application/x-www-form-urlencoded", as defined in the HTML 4.01 spec. Unlike soup_form_encode_hash(), this preserves the ordering of the form elements, which may be required in some situations.
|
Soup | |
Encodes form_data_set into a value of type
"application/x-www-form-urlencoded", as defined in the HTML 4.01 spec.
Encodes form_data_set into a value of type
"application/x-www-form-urlencoded", as defined in the HTML 4.01 spec. Note that the HTML spec states that "The control names/values are listed in the order they appear in the document." Since this method takes a hash table, it cannot enforce that; if you care about the ordering of the form fields, use soup_form_encode_datalist().
|
Soup | |
Creates a new SoupMessage and sets it up to send form_data_set to
Creates a new SoupMessage and sets it up to send form_data_set to
|
Soup | |
Creates a new SoupMessage and sets it up to send form_data_set to
Creates a new SoupMessage and sets it up to send form_data_set to
|
Soup | |
Creates a new SoupMessage and sets it up to send multipart to
To send a create a SoupMultipart, using SOUP_FORM_MIME_TYPE_MULTIPART as the MIME type.
Creates a new SoupMessage and sets it up to send multipart to
To send a create a SoupMultipart, using SOUP_FORM_MIME_TYPE_MULTIPART as the MIME type. Then use soup_multipart_append_form_string() and soup_multipart_append_form_file() to add the value of each form control to the multipart. (These are just convenience methods, and you can use soup_multipart_append_part() if you need greater control over the part headers.) Finally, call soup_form_request_new_from_multipart() to serialize the multipart structure and create a SoupMessage.
|
Soup | |
Parses header to see if it contains the token token (matched
case-insensitively).
Parses header to see if it contains the token token (matched
case-insensitively). Note that this can't be used with lists that have qvalues.
|
Soup | |
Soup.header_free_param_list
(Object param_list)
:
none
Frees param_list.
Frees param_list.
|
Soup | |
Appends something like
taking care to quote value if needed, and if so, to escape any quotes or backslashes in value.
Appends something like
taking care to quote value if needed, and if so, to escape any quotes or backslashes in value. Alternatively, if value is a non-ASCII UTF-8 string, it will be appended using RFC2231 syntax. Although in theory this is supposed to work anywhere in HTTP that uses this style of parameter, in reality, it can only be used portably with the Content-Disposition "filename" parameter. If value is NULL, this will just append name to string.
|
Soup | |
Appends something like
Appends something like
|
Soup | |
Parses a header whose content is described by RFC2616 as
"something", where "something" does not itself contain commas, except as part of quoted-strings. |
Soup | |
Parses a header which is a comma-delimited list of something like:
Parses a header which is a comma-delimited list of something like:
Tokens that don't have an associated value will still be added to the resulting hash table, but with a NULL value. This also handles RFC2231 encoding (which in HTTP is mostly used for giving UTF8-encoded filenames in the Content-Disposition header). GHashTable of list elements, which can be freed with soup_header_free_param_list().
|
Soup | |
Parses a header whose content is a list of items with optional
"qvalue"s (eg, Accept, Accept-Charset, Accept-Encoding, Accept-Language, TE).
Parses a header whose content is a list of items with optional
"qvalue"s (eg, Accept, Accept-Charset, Accept-Encoding, Accept-Language, TE). If unacceptable is not NULL, then on return, it will contain the items with qvalue 0. Either way, those items will be removed from the main list. allocated strings), highest-qvalue first.
|
Soup | |
Parses a header which is a semicolon-delimited list of something
Tokens that don't have an associated value will still be added to the resulting hash table, but with a NULL value.
Parses a header which is a semicolon-delimited list of something
Tokens that don't have an associated value will still be added to the resulting hash table, but with a NULL value. This also handles RFC2231 encoding (which in HTTP is mostly used for giving UTF8-encoded filenames in the Content-Disposition header). GHashTable of list elements, which can be freed with soup_header_free_param_list().
|
Soup | |
Parses the headers of an HTTP request or response in str and
stores the results in dest.
Parses the headers of an HTTP request or response in str and
stores the results in dest. Beware that dest may be modified even on failure. This is a low-level method; normally you would use soup_headers_parse_request() or soup_headers_parse_response().
|
Soup | |
Soup.headers_parse_request
(String str, gint32 len, MessageHeaders req_headers, Object out_values)
:
guint32
Parses the headers of an HTTP request in str and stores the
results in req_method, req_path, ver, and req_headers.
Parses the headers of an HTTP request in str and stores the
results in req_method, req_path, ver, and req_headers. Beware that req_headers may be modified even on failure. HTTP error to be returned to the client if they could not be.
|
Soup | |
Soup.headers_parse_response
(String str, gint32 len, MessageHeaders headers, Object out_values)
:
gboolean
Parses the headers of an HTTP response in str and stores the
results in ver, status_code, reason_phrase, and headers.
Parses the headers of an HTTP response in str and stores the
results in ver, status_code, reason_phrase, and headers. Beware that headers may be modified even on failure.
|
Soup | |
Parses the HTTP Status-Line string in status_line into ver,
either "\0" or "\r\n". |
Soup | |
Soup.http_error_quark
()
:
guint32
|
Soup | |
Soup.ssl_error_quark
()
:
guint32
The quark used as SOUP_SSL_ERROR
The quark used as SOUP_SSL_ERROR
|
Soup | |
Looks up the stock HTTP description of status_code.
Looks up the stock HTTP description of status_code. This is used
by soup_message_set_status() to get the correct text to go with a given status code. function. status_code of a given SoupMessage, you should just look at the message's reason_phrase. However, you should only do that for use in debugging messages; HTTP reason phrases are not localized, and are not generally very descriptive anyway, and so they should never be presented to the user directly. Instead, you should create you own error messages based on the status code, and on what you were trying to do.
|
Soup | |
Turns SOUP_STATUS_CANT_RESOLVE into
SOUP_STATUS_CANT_RESOLVE_PROXY and SOUP_STATUS_CANT_CONNECT into SOUP_STATUS_CANT_CONNECT_PROXY.
Turns SOUP_STATUS_CANT_RESOLVE into
SOUP_STATUS_CANT_RESOLVE_PROXY and SOUP_STATUS_CANT_CONNECT into SOUP_STATUS_CANT_CONNECT_PROXY. Other status codes are passed through unchanged.
|
Soup | |
Soup | ||
Soup | ||
Soup | ||
This %-encodes the given URI part and returns the escaped
version in allocated memory, which the caller must free when it is done.
This %-encodes the given URI part and returns the escaped
version in allocated memory, which the caller must free when it is done.
|
Soup | |
Soup | ||
Soup | ||
%-decodes any "unreserved" characters (or characters in
"Unreserved" characters are those that are not allowed to be used for punctuation according to the URI spec.
%-decodes any "unreserved" characters (or characters in
"Unreserved" characters are those that are not allowed to be used for punctuation according to the URI spec. For example, letters are unreserved, so soup_uri_normalize() will turn to mean the same thing. However, "/" is "reserved", so be changed, because it might mean something different to the server. In the past, this would return NULL if part contained invalid percent-encoding, but now it just ignores the problem (as soup_uri_new() already did).
|
Soup | |
Soup.value_array_new
()
:
GObject.ValueArray
Creates a new GValueArray.
Creates a new GValueArray. (This is just a wrapper around
g_value_array_new(), for naming consistency purposes.)
|
Soup | |
Inserts value into hash.
Inserts value into hash. (Unlike with g_hash_table_insert(), both
the key and the value are copied).
|
Soup | |
Soup.value_hash_new
()
:
Object
Creates a GHashTable whose keys are strings and whose values
are GValue.
Creates a GHashTable whose keys are strings and whose values
are GValue. empty GHashTable
|
Soup | |
This creates an XML-RPC methodCall and returns it as a string.
This creates an XML-RPC methodCall and returns it as a string.
This is the low-level method that soup_xmlrpc_request_new() and soup_xmlrpc_call() are built on. GValueArray, you can just pass its values and n_values fields.) The correspondence between glib types and XML-RPC types is: For structs, use a GHashTable that maps strings to GValue; soup_value_hash_new() and related methods can help with this.
|
Soup | |
This creates a (successful) XML-RPC methodResponse and returns it
as a string.
This creates a (successful) XML-RPC methodResponse and returns it
as a string. To create a fault response, use soup_xmlrpc_build_fault(). The glib type to XML-RPC type mapping is as with soup_xmlrpc_build_method_call(), qv.
|
Soup | |
Soup.xmlrpc_error_quark
()
:
guint32
|
Soup | |
Soup.xmlrpc_fault_quark
()
:
guint32
|
Soup | |
Parses method_call to get the name and parameters, and returns the
parameter values in a GValueArray; see also soup_xmlrpc_extract_method_call(), which is more convenient if you know in advance what the types of the parameters will be.
Parses method_call to get the name and parameters, and returns the
parameter values in a GValueArray; see also soup_xmlrpc_extract_method_call(), which is more convenient if you know in advance what the types of the parameters will be.
|
Soup | |
Soup.xmlrpc_parse_method_response
(String method_response, gint32 length, Object out_values)
:
gboolean
Parses method_response and returns the return value in value.
Parses method_response and returns the return value in value. If
will be set to an error of type SOUP_XMLRPC_FAULT, with the error code containing the fault code, and the error message containing the fault string. (If method_response cannot be parsed at all, soup_xmlrpc_parse_method_response() will return FALSE, but error will be unset.) response could not be parsed, or contained a fault.
|
Soup |
None |