WebKit2.URISchemeResponse¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
w/co |
|||
w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Name |
Type |
Access |
Description |
---|---|---|---|
parent |
r |
Class Details¶
- class WebKit2.URISchemeResponse(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Represents a URI scheme response.
If you register a particular URI scheme in a
WebKit2.WebContext
, usingWebKit2.WebContext.register_uri_scheme
(), you have to provide aWebKit2.URISchemeRequestCallback
. After that, when a URI response is made with that particular scheme, your callback will be called. There you will be able to provide more response parameters when the methods and properties of aWebKit2.URISchemeRequest
is not enough.When you finished setting up your
WebKit2.URISchemeResponse
, call webkit_uri_request_finish_with_response() with it to return the response.- classmethod new(input_stream, stream_length)¶
- Parameters:
input_stream (
Gio.InputStream
) – aGio.InputStream
to read the contents of the requeststream_length (
int
) – the length of the stream or -1 if not known
- Returns:
the newly created
WebKit2.URISchemeResponse
.- Return type:
Create a new
WebKit2.URISchemeResponse
New in version 2.36.
- set_content_type(content_type)¶
- Parameters:
content_type (
str
) – the content type of the stream
Sets the content type for the self
New in version 2.36.
- set_http_headers(headers)¶
- Parameters:
headers (
Soup.MessageHeaders
) – the HTTP headers to be set
Assign the provided
Soup.MessageHeaders
to the response.headers need to be of the type
Soup.MessageHeadersType.RESPONSE
. Any existing headers will be overwritten.New in version 2.36.
Property Details¶
- WebKit2.URISchemeResponse.props.stream¶
- Name:
stream
- Type:
- Default Value:
- Flags:
The input stream to read from.
New in version 2.36.
- WebKit2.URISchemeResponse.props.stream_length¶
- Name:
stream-length
- Type:
- Default Value:
-1
- Flags:
The input stream length in bytes,
-1
for unknown length.New in version 2.36.