Soup.Request¶
- Subclasses:
Methods¶
- Inherited:
- Structs:
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
|
|
|
|
|
|
|
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
The request’s session |
||
r/w/co |
The request URI |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class Soup.Request(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
A request to retrieve a particular URI.
New in version 2.42.
- get_content_length()¶
- Returns:
the length of the data represented by self, or -1 if not known.
- Return type:
Gets the length of the data represented by self. For most request types, this will not be known until after you call
Soup.Request.send
() orSoup.Request.send_finish
().New in version 2.42.
- get_content_type()¶
-
Gets the type of the data represented by self. For most request types, this will not be known until after you call
Soup.Request.send
() orSoup.Request.send_finish
().As in the HTTP Content-Type header, this may include parameters after the MIME type.
New in version 2.42.
- get_session()¶
- Returns:
self's
Soup.Session
- Return type:
Gets self's
Soup.Session
New in version 2.42.
- send(cancellable)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
- Raises:
- Returns:
a
Gio.InputStream
that can be used to read from the URI pointed to by self.- Return type:
Synchronously requests the URI pointed to by self, and returns a
Gio.InputStream
that can be used to read its contents.Note that you cannot use this method with
Soup.Requests
attached to aSoup.SessionAsync
.New in version 2.42.
- send_async(cancellable, callback, *user_data)¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
Begins an asynchronously request for the URI pointed to by self.
Note that you cannot use this method with
Soup.Requests
attached to aSoup.SessionSync
.New in version 2.42.
- send_finish(result)¶
- Parameters:
result (
Gio.AsyncResult
) – theGio.AsyncResult
- Raises:
- Returns:
a
Gio.InputStream
that can be used to read from the URI pointed to by self.- Return type:
Gets the result of a
Soup.Request.send_async
().New in version 2.42.
- do_get_content_length() virtual¶
- Returns:
the length of the data represented by request, or -1 if not known.
- Return type:
Gets the length of the data represented by request. For most request types, this will not be known until after you call
Soup.Request.send
() orSoup.Request.send_finish
().New in version 2.42.
- do_get_content_type() virtual¶
- Returns:
the type of the data represented by request, or
None
if not known.- Return type:
Gets the type of the data represented by request. For most request types, this will not be known until after you call
Soup.Request.send
() orSoup.Request.send_finish
().As in the HTTP Content-Type header, this may include parameters after the MIME type.
New in version 2.42.
- do_send(cancellable) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
- Returns:
a
Gio.InputStream
that can be used to read from the URI pointed to by request.- Return type:
Synchronously requests the URI pointed to by request, and returns a
Gio.InputStream
that can be used to read its contents.Note that you cannot use this method with
Soup.Requests
attached to aSoup.SessionAsync
.New in version 2.42.
- do_send_async(cancellable, callback, *user_data) virtual¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – aGio.Cancellable
orNone
callback (
Gio.AsyncReadyCallback
orNone
) – aGio.AsyncReadyCallback
Begins an asynchronously request for the URI pointed to by request.
Note that you cannot use this method with
Soup.Requests
attached to aSoup.SessionSync
.New in version 2.42.
- do_send_finish(result) virtual¶
- Parameters:
result (
Gio.AsyncResult
) – theGio.AsyncResult
- Returns:
a
Gio.InputStream
that can be used to read from the URI pointed to by request.- Return type:
Gets the result of a
Soup.Request.send_async
().New in version 2.42.
Property Details¶
- Soup.Request.props.session¶
- Name:
session
- Type:
- Default Value:
- Flags:
The request’s
Soup.Session
.New in version 2.42.