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
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, Object out_values) : 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
get_authorization (Message msg) : String
Generates an appropriate "Authorization" header for msg.
Soup.Auth
Method
update (Message msg, String auth_header) : gboolean
Updates auth with the information from msg and auth_header,
possibly un-authenticating it.
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
check_password (Message msg, String username, String password) : gboolean
Checks if msg authenticates to domain via username and
SoupAuthDomainGenericAuthCallback.
Soup.AuthDomain
Method
covers (Message msg) : gboolean
Checks if domain requires msg to be authenticated (according to
its paths and filter function).
Soup.AuthDomain
Method
try_generic_auth_callback (Message msg, String username) : gboolean
Soup.ContentSniffer
Method
sniff (Message msg, Buffer buffer, Object params) : String
Soup.ProxyResolver
Method
get_proxy_sync (Message msg, Cancellable cancellable, Address addr) : guint32
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, gboolean 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
cancel_message (Message msg, guint32 status_code) : none
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.
Soup.Session
Method
pause_message (Message msg) : none
Pauses HTTP I/O on msg.
Soup.Session
Method
queue_message (Message msg, Function callback, void* user_data) : none
Queues the message msg for sending.
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) : guint32
Synchronously send msg.
Soup.Session
Method
unpause_message (Message msg) : none
Resumes HTTP I/O on msg.
WebKit.NetworkRequest
Property
message : Soup.Message
The SoupMessage that backs the request.
WebKit.NetworkRequest
Method
get_message () : Soup.Message
Obtains the SoupMessage held and used by the given request.
WebKit.NetworkResponse
Property
message : Soup.Message
The SoupMessage that backs the response.
WebKit.NetworkResponse
Method
get_message () : Soup.Message
Obtains the SoupMessage that represents the given response.
WebKit.SoupAuthDialog
Signal
current_toplevel (SoupAuthDialog self, Message message) : Gtk.Widget
This signal is emitted by the authDialog when it needs to know
the current toplevel widget in order to correctly set the
transiency for the authentication dialog.
Documentation generated by Introspection Doc Generator Loosely Based on JsDoc Toolkit on Sat Apr 16 2011 17:16:54 GMT+0800 (HKT)