URISchemeRequest#
Superclasses: Object
Represents a URI scheme request.
If you register a particular URI scheme in a WebContext,
using register_uri_scheme(), you have to provide
a URISchemeRequestCallback. After that, when a URI request
is made with that particular scheme, your callback will be
called. There you will be able to access properties such as the
scheme, the URI and path, and the WebView that initiated the
request, and also finish the request with
finish().
Methods#
- class URISchemeRequest
- finish(stream: InputStream, stream_length: int, content_type: str | None = None) None#
Finish a
URISchemeRequestby setting the contents of the request and its mime type.- Parameters:
stream – a
InputStreamto read the contents of the requeststream_length – the length of the stream or -1 if not known
content_type – the content type of the stream or
Noneif not known
- finish_error(error: GError) None#
Finish a
URISchemeRequestwith aError.Added in version 2.2.
- finish_with_response(response: URISchemeResponse) None#
Finish a
URISchemeRequestby returning aURISchemeResponseAdded in version 2.36.
- Parameters:
response – a
URISchemeResponse
- get_http_body() InputStream#
Get the request body.
Added in version 2.40.
- get_http_headers() MessageHeaders#
Get the
MessageHeadersof the request.Added in version 2.36.