Back to Seed Clases

Soup


Classes

Interfaces

Structs

Unions

Enums

GObject.Object
parent-child marker Soup.Message

Class Soup.Message

Import line: Soup = imports.gi.Soup;
GIR File: Soup-2.4.gir
C documentation: SoupMessage
Class : Message
Extends: GObject.Object
  Show / Hide Inherited methods, properties and signals
Represents an HTTP message being sent or received. SOUP_STATUS_OK, though of course it might actually be an unknown status code. reason_phrase is the actual text returned from the server, which may or may not correspond to the "standard" description of status_code. At any rate, it is almost certainly not localized, and not very descriptive even if it is in the user's language; you should not use reason_phrase in user-visible messages. Rather, you should look at status_code, and determine an end-user-appropriate message based on that and on what you were trying to do. As described in the SoupMessageBody documentation, the be filled in at all times. When they are filled in, they will be terminated with a '\0' byte (which is not included in the length), so you can use them as ordinary C strings (assuming that you know that the body doesn't have any other '\0' bytes). For a client-side SoupMessage, request_body's data is usually filled in right before libsoup writes the request to the network, but you should not count on this; use soup_message_body_flatten() if you want to ensure that data is filled in. response_body's data will be filled in before SoupMessage::finished is emitted. For a server-side SoupMessage, request_body's data will be filled in before SoupMessage::got_body is emitted. To prevent the data field from being filled in at all (eg, if you are handling the data from a SoupMessage::got_chunk, and so don't need to see it all at the end), call soup_message_body_set_accumulate() on response_body or
Properties
Properties Defined By
Methods / Constructors
Method / Constructor Defined By
Events - usage syntax: this.signals.EVENTNAME.connect( Function )
Event Defined By
Used by These Methods / Signals / Properties
Class / Namespace Method / Signal / Properties
Soup
Method
Soup.cookies_from_request (Message msg) : Array
Parses msg's Cookie request header and returns a GSList of SoupCookies.
Soup
Method
Soup.cookies_from_response (Message msg) : Array
Parses msg's Set-Cookie response headers and returns a GSList of SoupCookies.
Soup
Method
Soup.cookies_to_request (Array cookies, Message msg) : none
Adds the name and value of each cookie in cookies to msg's "Cookie" request.
Soup
Method
Soup.cookies_to_response (Array cookies, Message msg) : none
Appends a "Set-Cookie" response header to msg for each cookie in
Soup
Method
Soup.form_decode_multipart (Message msg, String file_control_name, Array filename, Array content_type, Buffer file) : Object
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.
Soup
Method
Soup.form_request_new_from_datalist (String method, String uri, Data form_data_set) : Soup.Message
Creates a new SoupMessage and sets it up to send form_data_set to
Soup
Method
Soup.form_request_new_from_hash (String method, String uri, Object form_data_set) : Soup.Message
Creates a new SoupMessage and sets it up to send form_data_set to
Soup
Method
Soup.form_request_new_from_multipart (String uri, Multipart multipart) : Soup.Message
Creates a new SoupMessage and sets it up to send multipart to To send a "multipart/form-data" POST, first create a SoupMultipart, using SOUP_FORM_MIME_TYPE_MULTIPART as the MIME type.
Soup.Auth
Method
new Soup.Auth.c_new (Number type, Message msg, String auth_header) : Soup.Auth
Create a new Soup.Auth
Soup.Auth
Method
update (Message msg, String auth_header) : Boolean
Updates auth with the information from msg and auth_header, possibly un-authenticating it.
Soup.Auth
Method
get_authorization (Message msg) : String
Generates an appropriate "Authorization" header for msg.
Soup.AuthDomain
Method
check_password (Message msg, String username, String password) : Boolean
Checks if msg authenticates to domain via username and SoupAuthDomainGenericAuthCallback.
Soup.AuthDomain
Method
covers (Message msg) : Boolean
Checks if domain requires msg to be authenticated (according to its paths and filter function).
Soup.AuthDomain
Method
accepts (Message msg) : String
Checks if msg contains appropriate authorization for domain to accept it.
Soup.AuthDomain
Method
challenge (Message msg) : none
Adds a "WWW-Authenticate" or "Proxy-Authenticate" header to msg, requesting that the client authenticate, and sets msg's status accordingly.
Soup.AuthDomain
Method
try_generic_auth_callback (Message msg, String username) : Boolean
Soup.AuthManager
Signal
authenticate (AuthManager self, Message object, Auth p0, Boolean p1) : none
Soup.AuthManager
Method
emit_authenticate (Message msg, Auth auth, Boolean retrying) : none
Soup.Connection
Property
message : Soup.Message read only
Soup.Connection
Method
send_request (Message req) : none
Sends req on conn.
Soup.ContentSniffer
Method
sniff (Message msg, Buffer buffer, Object params) : String
Soup.MessageQueue
Method
append (Message msg, Function callback, void* user_data) : Soup.MessageQueueItem
Creates a new SoupMessageQueueItem and appends it to queue.
Soup.MessageQueue
Method
Finds the SoupMessageQueueItem for msg in queue.
Soup.ProxyResolver
Method
get_proxy_async (Message msg, MainContext async_context, Cancellable cancellable, Function callback, void* user_data) : none
Soup.ProxyResolver
Method
get_proxy_sync (Message msg, Cancellable cancellable, Address addr) : Number
Soup.Server
Signal
request_aborted (Server self, Message object, ClientContext p0) : none
Soup.Server
Signal
request_finished (Server self, Message object, ClientContext p0) : none
Soup.Server
Signal
request_read (Server self, Message object, ClientContext p0) : none
Soup.Server
Signal
request_started (Server self, Message object, ClientContext p0) : none
Soup.Server
Method
pause_message (Message msg) : none
Pauses I/O on msg.
Soup.Server
Method
unpause_message (Message msg) : none
Resumes I/O on msg.
Soup.Session
Signal
authenticate (Session self, Message object, Auth p0, Boolean p1) : none
Soup.Session
Signal
request_queued (Session self, Message object) : none
Soup.Session
Signal
request_started (Session self, Message object, Socket p0) : none
Soup.Session
Signal
request_unqueued (Session self, Message object) : none
Soup.Session
Method
queue_message (Message msg, Function callback, void* user_data) : none
be called after the message completes or when an unrecoverable error occurs.
Soup.Session
Method
requeue_message (Message msg) : none
This causes msg to be placed back on the queue to be attempted again.
Soup.Session
Method
send_message (Message msg) : Number
Synchronously send msg.
Soup.Session
Method
pause_message (Message msg) : none
Pauses HTTP I/O on msg.
Soup.Session
Method
unpause_message (Message msg) : none
Resumes HTTP I/O on msg.
Soup.Session
Method
cancel_message (Message msg, Number status_code) : none
SOUP_STATUS_CANCELLED) Causes session to immediately finish processing msg (regardless of its current state) with a final status_code of status_code.
Soup.Session
Method
get_feature_for_message (Number feature_type, Message msg) : Soup.SessionFeature
Gets the first feature in session of type feature_type, provided that it is not disabled for msg.
WebKit.NetworkRequest
Property
message : Soup.Message
WebKit.NetworkRequest
Method
get_message () : Soup.Message
WebKit.NetworkResponse
Property
message : Soup.Message
WebKit.NetworkResponse
Method
get_message () : Soup.Message
WebKit.SoupAuthDialog
Signal
current_toplevel (SoupAuthDialog self, Message object) : Gtk.Widget
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Tue Jun 22 2010 16:34:59 GMT+0800 (HKT)