WebKit.URISchemeResponse¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
w/co |
|||
w/co |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class WebKit.URISchemeResponse(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
Represents a URI scheme response.
If you register a particular URI scheme in a
WebKit.WebContext
, usingWebKit.WebContext.register_uri_scheme
(), you have to provide aWebKit.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 aWebKit.URISchemeRequest
is not enough.When you finished setting up your
WebKit.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
WebKit.URISchemeResponse
.- Return type:
Create a new
WebKit.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¶
- WebKit.URISchemeResponse.props.stream¶
- Name:
stream
- Type:
- Default Value:
- Flags:
The input stream to read from.
New in version 2.36.
- WebKit.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.