ResponsePolicyDecision#

class ResponsePolicyDecision(**properties: Any)#

Superclasses: PolicyDecision, Object

A policy decision for resource responses.

WebKitResponsePolicyDecision represents a policy decision for a resource response, whether from the network or the local system. A very common use case for these types of decision is deciding whether or not to download a particular resource or to load it normally.

Methods#

class ResponsePolicyDecision
get_request() URIRequest#

Return the URIRequest associated with the response decision.

Modifications to the returned object are <emphasis>not</emphasis> taken into account when the request is sent over the network, and is intended only to aid in evaluating whether a response decision should be taken or not. To modify requests before they are sent over the network the WebKitPage::send-request signal can be used instead.

get_response() URIResponse#

Gets the value of the ResponsePolicyDecision:response property.

is_main_frame_main_resource() bool#

Gets whether the request is the main frame main resource

Added in version 2.40.

is_mime_type_supported() bool#

Gets whether the MIME type of the response can be displayed in the WebView.

Gets whether the MIME type of the response can be displayed in the WebView that triggered this policy decision request. See also can_show_mime_type().

Added in version 2.4.

Properties#

class ResponsePolicyDecision
props.request: URIRequest#

The type of the None singleton.

props.response: URIResponse#

The type of the None singleton.