GObject.Object
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 |
Properties | Defined By | |
---|---|---|
first_party : Soup.URI
|
Soup.Message | |
flags : Soup.MessageFlags
|
Soup.Message | |
http_version : Soup.HTTPVersion
|
Soup.Message | |
method : String
|
Soup.Message | |
method : String
read only
|
Soup.Message | |
parent : GObject.Object
read only
|
Soup.Message | |
reason_phrase : String
|
Soup.Message | |
reason_phrase : String
read only
|
Soup.Message | |
request_body : Soup.MessageBody
read only
|
Soup.Message | |
request_body : Soup.MessageBody
read only
|
Soup.Message | |
request_headers : Soup.MessageHeaders
read only
|
Soup.Message | |
request_headers : Soup.MessageHeaders
read only
|
Soup.Message | |
response_body : Soup.MessageBody
read only
|
Soup.Message | |
response_body : Soup.MessageBody
read only
|
Soup.Message | |
response_headers : Soup.MessageHeaders
read only
|
Soup.Message | |
response_headers : Soup.MessageHeaders
read only
|
Soup.Message | |
server_side : Boolean
|
Soup.Message | |
status_code : Number
|
Soup.Message | |
status_code : Number
read only
|
Soup.Message | |
uri : Soup.URI
|
Soup.Message |
Method / Constructor | Defined By | |
---|---|---|
new Soup.Message
(Object properties)
Create a new Soup.Message
Create a new Soup.Message
|
||
Create a new Soup.Message
Create a new Soup.Message
|
||
Create a new Soup.Message
Create a new Soup.Message
|
||
Adds a signal handler to msg for signal, as with only be run if msg has a header named header, and it will only be run if no earlier handler cancelled or requeued the message.
Adds a signal handler to msg for signal, as with only be run if msg has a header named header, and it will only be run if no earlier handler cancelled or requeued the message. If signal is one of the "got" signals (eg, "got_headers"), or "finished" or "restarted", then header is matched against the incoming message headers (that is, the request_headers for a client SoupMessage, or the response_headers for a server SoupMessage). If signal is one of the "wrote" signals, then
|
Soup.Message | |
add_status_code_handler
(String signal, Number status_code, Function callback, void* user_data)
:
Number
Adds a signal handler to msg for signal, as with only be run if msg has the status status_code, and it will only be run if no earlier handler cancelled or requeued the message.
Adds a signal handler to msg for signal, as with only be run if msg has the status status_code, and it will only be run if no earlier handler cancelled or requeued the message. is set. For a client SoupMessage, this means it can't be a "wrote" signal. For a server SoupMessage, this means it can't be a "got" signal.
|
Soup.Message | |
cleanup_response
()
:
none
Cleans up all response data on req, so that the request can be sent again and receive a new response.
Cleans up all response data on req, so that the request can be sent again and receive a new response. (Eg, as a result of a redirect or authorization request.)
|
Soup.Message | |
Emits the content_sniffed signal, indicating that the IO layer finished sniffing the content type for msg.
Emits the content_sniffed signal, indicating that the IO layer finished sniffing the content type for msg. If content sniffing will not be performed, due to the sniffer deciding to trust the Content-Type sent by the server, this signal is emitted immediately after got_headers, with NULL as content_type.
|
Soup.Message | |
disable_feature
(Number feature_type)
:
none
This disables the actions of SoupSessionFeatures with the given feature_type (or a subclass of that type) on msg, so that session.
This disables the actions of SoupSessionFeatures with the given feature_type (or a subclass of that type) on msg, so that session. Eg, passing SOUP_TYPE_PROXY_RESOLVER for feature_type will disable proxy handling and cause msg to be sent directly to the indicated origin server, regardless of system proxy configuration. You must call this before queueing msg on a session; calling it on a message that has already been queued is undefined. In particular, you cannot call this on a message that is being requeued after a redirect or authentication.
|
Soup.Message | |
Soup.Message | ||
finished
()
:
none
Emits the finished signal, indicating that msg has been completely processed.
Emits the finished signal, indicating that msg has been completely processed.
|
Soup.Message | |
get_address
()
:
Soup.Address
Gets the address msg's URI points to.
Gets the address msg's URI points to. After first setting the URI on a message, this will be unresolved, although the message's session will resolve it before sending the message.
|
Soup.Message | |
get_auth
()
:
Soup.Auth
Gets the SoupAuth used by msg for authentication.
Gets the SoupAuth used by msg for authentication. NULL if msg is unauthenticated.
|
Soup.Message | |
get_first_party
()
:
Soup.URI
|
Soup.Message | |
get_flags
()
:
Soup.MessageFlags
Gets the flags on msg
Gets the flags on msg
|
Soup.Message | |
get_http_version
()
:
Soup.HTTPVersion
Gets the HTTP version of msg.
Gets the HTTP version of msg. This is the minimum of the version from the request and the version from the response.
|
Soup.Message | |
get_io_status
()
:
Soup.MessageIOStatus
|
Soup.Message | |
get_proxy_auth
()
:
Soup.Auth
Gets the SoupAuth used by msg for authentication to its proxy.
Gets the SoupAuth used by msg for authentication to its proxy.. proxy, or NULL if msg isn't authenticated to its proxy.
|
Soup.Message | |
get_uri
()
:
Soup.URI
Gets msg's URI
Gets msg's URI
|
Soup.Message | |
got_body
()
:
none
Emits the got_body signal, indicating that the IO layer finished reading the body for msg.
Emits the got_body signal, indicating that the IO layer finished reading the body for msg.
|
Soup.Message | |
got_chunk
(Buffer chunk)
:
none
Emits the got_chunk signal, indicating that the IO layer finished reading a chunk of msg's body.
Emits the got_chunk signal, indicating that the IO layer finished reading a chunk of msg's body.
|
Soup.Message | |
got_headers
()
:
none
Emits the got_headers signal, indicating that the IO layer finished reading the (non-informational) headers for msg.
Emits the got_headers signal, indicating that the IO layer finished reading the (non-informational) headers for msg.
|
Soup.Message | |
got_informational
()
:
none
Emits the got_informational signal, indicating that the IO layer read a complete informational (1xx) response for msg.
Emits the got_informational signal, indicating that the IO layer read a complete informational (1xx) response for msg.
|
Soup.Message | |
io_cleanup
()
:
none
|
Soup.Message | |
io_client
(Socket sock, Connection conn, Function get_headers_cb, Function parse_headers_cb, void* user_data)
:
none
|
Soup.Message | |
io_in_progress
()
:
Boolean
Tests whether or not I/O is currently in progress on msg.
Tests whether or not I/O is currently in progress on msg.
|
Soup.Message | |
io_pause
()
:
none
|
Soup.Message | |
|
Soup.Message | |
io_stop
()
:
none
Immediately stops I/O on msg; if the connection would be left in an inconsistent state, it will be closed.
Immediately stops I/O on msg; if the connection would be left in an inconsistent state, it will be closed. to be emitted on msg; it is up to the caller to make sure that
|
Soup.Message | |
io_unpause
()
:
none
|
Soup.Message | |
is_keepalive
()
:
Boolean
Determines whether or not msg's connection can be kept alive for further requests after processing msg, based on the HTTP version, Connection header, etc.
Determines whether or not msg's connection can be kept alive for further requests after processing msg, based on the HTTP version, Connection header, etc.
|
Soup.Message | |
read_request
(Socket sock)
:
none
|
Soup.Message | |
restarted
()
:
none
Emits the restarted signal, indicating that msg should be requeued.
Emits the restarted signal, indicating that msg should be requeued.
|
Soup.Message | |
|
Soup.Message | |
set_auth
(Auth auth)
:
none
Sets msg to authenticate to its destination using auth, which must have already been fully authenticated.
Sets msg to authenticate to its destination using auth, which must have already been fully authenticated. If auth is NULL, msg will not authenticate to its destination.
|
Soup.Message | |
destroyed Sets an alternate chunk-allocation function to use when reading call allocator, which should return a SoupBuffer.
destroyed Sets an alternate chunk-allocation function to use when reading call allocator, which should return a SoupBuffer. (See SoupChunkAllocator for additional details.) Libsoup will then read data from the network into that buffer, and update the buffer's length to indicate how much data it read. Generally, a custom chunk allocator would be used in conjunction with soup_message_body_set_accumulate() FALSE and SoupMessage::got_chunk, as part of a strategy to avoid unnecessary copying of data. However, you cannot assume that every call to the allocator will be followed by a call to your got_chunk handler; if an I/O error occurs, then the buffer will be unreffed without ever having been used. If your buffer-allocation strategy requires special cleanup, use soup_buffer_new_with_owner() rather than doing the cleanup from the got_chunk handler. The other thing to remember when using non-accumulating message bodies is that the buffer passed to the got_chunk handler will be unreffed after the handler returns, just as it would be in the non-custom-allocated case. If you want to hand the chunk data off to some other part of your program to use later, you'll need to ref the SoupBuffer (or its owner, in the soup_buffer_new_with_owner() case) to ensure that the data remains valid.
|
Soup.Message | |
set_first_party
(URI first_party)
:
none
Sets first_party as the main document SoupURI for msg.
Sets first_party as the main document SoupURI for msg. For details of when and how this is used refer to the documentation for SoupCookieJarAcceptPolicy.
|
Soup.Message | |
set_flags
(MessageFlags flags)
:
none
Sets the specified flags on msg.
Sets the specified flags on msg.
|
Soup.Message | |
set_http_version
(HTTPVersion version)
:
none
Sets the HTTP version on msg.
Sets the HTTP version on msg. The default version is SOUP_HTTP_1_1. Setting it to SOUP_HTTP_1_0 will prevent certain functionality from being used.
|
Soup.Message | |
set_io_status
(MessageIOStatus status)
:
none
|
Soup.Message | |
set_proxy_auth
(Auth auth)
:
none
Sets msg to authenticate to its proxy using auth, which must have already been fully authenticated.
Sets msg to authenticate to its proxy using auth, which must have already been fully authenticated. If auth is NULL, msg will not authenticate to its proxy.
|
Soup.Message | |
Convenience function to set the request body of a SoupMessage.
Convenience function to set the request body of a SoupMessage. If
|
Soup.Message | |
containing the body of the message response.
containing the body of the message response. Convenience function to set the response body of a SoupMessage. If
|
Soup.Message | |
set_status
(Number status_code)
:
none
Sets msg's status code to status_code.
Sets msg's status code to status_code. If status_code is a known value, it will also set msg's reason_phrase.
|
Soup.Message | |
Soup.Message | ||
set_uri
(URI uri)
:
none
Sets msg's URI to uri.
Sets msg's URI to uri. If msg has already been sent and you want to re-send it with the new URI, you need to call soup_session_requeue_message().
|
Soup.Message | |
wrote_body
()
:
none
Emits the wrote_body signal, indicating that the IO layer finished writing the body for msg.
Emits the wrote_body signal, indicating that the IO layer finished writing the body for msg.
|
Soup.Message | |
wrote_body_data
(Buffer chunk)
:
none
Emits the wrote_body_data signal, indicating that the IO layer finished writing a portion of msg's body.
Emits the wrote_body_data signal, indicating that the IO layer finished writing a portion of msg's body.
|
Soup.Message | |
wrote_chunk
()
:
none
Emits the wrote_chunk signal, indicating that the IO layer finished writing a chunk of msg's body.
Emits the wrote_chunk signal, indicating that the IO layer finished writing a chunk of msg's body.
|
Soup.Message | |
wrote_headers
()
:
none
Emits the wrote_headers signal, indicating that the IO layer finished writing the (non-informational) headers for msg.
Emits the wrote_headers signal, indicating that the IO layer finished writing the (non-informational) headers for msg.
|
Soup.Message | |
wrote_informational
()
:
none
Emits the wrote_informational signal, indicating that the IO layer finished writing an informational (1xx) response for msg.
Emits the wrote_informational signal, indicating that the IO layer finished writing an informational (1xx) response for msg.
|
Soup.Message |
Event | Defined By | |
---|---|---|
|
Soup.Message | |
finished (Message self)
:
none
|
Soup.Message | |
got_body (Message self)
:
none
|
Soup.Message | |
|
Soup.Message | |
got_headers (Message self)
:
none
|
Soup.Message | |
got_informational (Message self)
:
none
|
Soup.Message | |
restarted (Message self)
:
none
|
Soup.Message | |
wrote_body (Message self)
:
none
|
Soup.Message | |
|
Soup.Message | |
wrote_chunk (Message self)
:
none
|
Soup.Message | |
wrote_headers (Message self)
:
none
|
Soup.Message | |
wrote_informational (Message self)
:
none
|
Soup.Message |
Class / Namespace | Method / Signal / Properties |
---|---|
Soup
Method |
Parses msg's Cookie request header and returns a GSList of SoupCookies.
|
Soup
Method |
Parses msg's Set-Cookie response headers and returns a GSList of SoupCookies.
|
Soup
Method |
Adds the name and value of each cookie in cookies to msg's "Cookie" request.
|
Soup
Method |
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 |
Creates a new SoupMessage and sets it up to send form_data_set to
|
Soup
Method |
Creates a new SoupMessage and sets it up to send form_data_set to
|
Soup
Method |
Creates a new SoupMessage and sets it up to send multipart to To send a
|
Soup.Auth
Method |
Create a new Soup.Auth
|
Soup.Auth
Method |
Updates auth with the information from msg and auth_header, possibly un-authenticating it.
|
Soup.Auth
Method |
Generates an appropriate "Authorization" header for msg.
|
Soup.AuthDomain
Method |
Checks if msg authenticates to domain via username and SoupAuthDomainGenericAuthCallback.
|
Soup.AuthDomain
Method |
Checks if domain requires msg to be authenticated (according to its paths and filter function).
|
Soup.AuthDomain
Method |
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 |
|
Soup.AuthManager
Signal |
|
Soup.AuthManager
Method |
|
Soup.Connection
Property |
message : Soup.Message
read only
|
Soup.Connection
Method |
send_request
(Message req)
:
none
Sends req on conn.
|
Soup.ContentSniffer
Method |
|
Soup.MessageQueue
Method |
Creates a new SoupMessageQueueItem and appends it to queue.
|
Soup.MessageQueue
Method |
lookup
(Message msg)
:
Soup.MessageQueueItem
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 |
|
Soup.Server
Signal |
|
Soup.Server
Signal |
|
Soup.Server
Signal |
|
Soup.Server
Signal |
|
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 |
|
Soup.Session
Signal |
|
Soup.Session
Signal |
|
Soup.Session
Signal |
|
Soup.Session
Method |
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 |
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 |
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 |
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 |
|