:right-sidebar: True ResponsePolicyDecision =================================================================== .. currentmodule:: gi.repository.WebKit .. class:: ResponsePolicyDecision(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.WebKit.PolicyDecision`, :class:`~gi.repository.GObject.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 ------- .. rst-class:: interim-class .. class:: ResponsePolicyDecision :no-index: .. method:: get_request() -> ~gi.repository.WebKit.URIRequest Return the :obj:`~gi.repository.WebKit.URIRequest` associated with the response decision. Modifications to the returned object are not 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. .. method:: get_response() -> ~gi.repository.WebKit.URIResponse Gets the value of the :obj:`~gi.repository.WebKit.ResponsePolicyDecision`\:response property. .. method:: is_main_frame_main_resource() -> bool Gets whether the request is the main frame main resource .. versionadded:: 2.40 .. method:: is_mime_type_supported() -> bool Gets whether the MIME type of the response can be displayed in the :obj:`~gi.repository.WebKit.WebView`\. Gets whether the MIME type of the response can be displayed in the :obj:`~gi.repository.WebKit.WebView` that triggered this policy decision request. See also :func:`~gi.repository.WebKit.WebView.can_show_mime_type`. .. versionadded:: 2.4 Properties ---------- .. rst-class:: interim-class .. class:: ResponsePolicyDecision :no-index: .. attribute:: props.request :type: ~gi.repository.WebKit.URIRequest The type of the None singleton. .. attribute:: props.response :type: ~gi.repository.WebKit.URIResponse The type of the None singleton.