:right-sidebar: True URIResponse =================================================================== .. currentmodule:: gi.repository.WebKit .. class:: URIResponse(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.GObject.Object` Represents an URI response. A :obj:`~gi.repository.WebKit.URIResponse` contains information such as the URI, the status code, the content length, the mime type, the HTTP status or the suggested filename. Methods ------- .. rst-class:: interim-class .. class:: URIResponse :no-index: .. method:: get_content_length() -> int Get the expected content length of the :obj:`~gi.repository.WebKit.URIResponse`\. It can be 0 if the server provided an incorrect or missing Content-Length. .. method:: get_http_headers() -> ~gi.repository.Soup.MessageHeaders Get the HTTP headers of a :obj:`~gi.repository.WebKit.URIResponse` as a :obj:`~gi.repository.Soup.MessageHeaders`\. .. versionadded:: 2.6 .. method:: get_mime_type() -> str Gets the MIME type of the response. .. method:: get_status_code() -> int Get the status code of the :obj:`~gi.repository.WebKit.URIResponse`\. Get the status code of the :obj:`~gi.repository.WebKit.URIResponse` as returned by the server. It will normally be a ``SoupKnownStatusCode``, for example %SOUP_STATUS_OK, though the server can respond with any unsigned integer. .. method:: get_suggested_filename() -> str Get the suggested filename for ``response``\. Get the suggested filename for ``response``\, as specified by the 'Content-Disposition' HTTP header, or :const:`None` if it's not present. .. method:: get_uri() -> str Gets the URI which resulted in the response. Properties ---------- .. rst-class:: interim-class .. class:: URIResponse :no-index: .. attribute:: props.content_length :type: int The type of the None singleton. .. attribute:: props.http_headers :type: ~gi.repository.Soup.MessageHeaders The type of the None singleton. .. versionadded:: 2.6 .. attribute:: props.mime_type :type: str The type of the None singleton. .. attribute:: props.status_code :type: int The type of the None singleton. .. attribute:: props.suggested_filename :type: str The type of the None singleton. .. attribute:: props.uri :type: str The type of the None singleton.