WebKit.URISchemeRequest

g GObject.Object GObject.Object WebKit.URISchemeRequest WebKit.URISchemeRequest GObject.Object->WebKit.URISchemeRequest

Subclasses:

None

Methods

Inherited:

GObject.Object (37)

Structs:

GObject.ObjectClass (5)

finish (stream, stream_length, content_type)

finish_error (error)

finish_with_response (response)

get_http_body ()

get_http_headers ()

get_http_method ()

get_path ()

get_scheme ()

get_uri ()

get_web_view ()

Virtual Methods

Inherited:

GObject.Object (7)

Properties

None

Signals

Inherited:

GObject.Object (1)

Fields

Inherited:

GObject.Object (1)

Class Details

class WebKit.URISchemeRequest(**kwargs)
Bases:

GObject.Object

Abstract:

No

Structure:

WebKit.URISchemeRequestClass

Represents a URI scheme request.

If you register a particular URI scheme in a WebKit.WebContext, using WebKit.WebContext.register_uri_scheme(), you have to provide a WebKit.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 WebKit.WebView that initiated the request, and also finish the request with WebKit.URISchemeRequest.finish().

finish(stream, stream_length, content_type)
Parameters:
  • stream (Gio.InputStream) – a Gio.InputStream to read the contents of the request

  • stream_length (int) – the length of the stream or -1 if not known

  • content_type (str or None) – the content type of the stream or None if not known

Finish a WebKit.URISchemeRequest by setting the contents of the request and its mime type.

finish_error(error)
Parameters:

error (GLib.Error) – a GLib.Error that will be passed to the WebKit.WebView

Finish a WebKit.URISchemeRequest with a GLib.Error.

New in version 2.2.

finish_with_response(response)
Parameters:

response (WebKit.URISchemeResponse) – a WebKit.URISchemeResponse

Finish a WebKit.URISchemeRequest by returning a WebKit.URISchemeResponse

New in version 2.36.

get_http_body()
Returns:

(nullable): the body of the self.

Return type:

Gio.InputStream

Get the request body.

New in version 2.40.

get_http_headers()
Returns:

the Soup.MessageHeaders of the self.

Return type:

Soup.MessageHeaders

Get the Soup.MessageHeaders of the request.

New in version 2.36.

get_http_method()
Returns:

the HTTP method of the self

Return type:

str

Get the HTTP method of the self.

New in version 2.36.

get_path()
Returns:

the URI path of self

Return type:

str

Get the URI path of self.

get_scheme()
Returns:

the URI scheme of self

Return type:

str

Get the URI scheme of self.

get_uri()
Returns:

the full URI of self

Return type:

str

Get the URI of self.

get_web_view()
Returns:

the WebKit.WebView that initiated self.

Return type:

WebKit.WebView

Get the WebKit.WebView that initiated the request.