WebKit2WebExtension.URIResponse

g GObject.Object GObject.Object WebKit2WebExtension.URIResponse WebKit2WebExtension.URIResponse GObject.Object->WebKit2WebExtension.URIResponse

Subclasses:None

Virtual Methods

Inherited:GObject.Object (7)

Properties

Name Type Flags Short Description
content-length int r The expected content length of the response.
http-headers Soup.MessageHeaders r The HTTP headers of the response
mime-type str r The MIME type of the response
status-code int r The status code of the response as returned by the server.
suggested-filename str r The suggested filename for the URI response
uri str r The URI for which the response was made.

Signals

Inherited:GObject.Object (1)

Fields

Inherited:GObject.Object (1)
Name Type Access Description
parent GObject.Object r  

Class Details

class WebKit2WebExtension.URIResponse(**kwargs)
Bases:GObject.Object
Abstract:No
Structure:WebKit2WebExtension.URIResponseClass
get_content_length()
Returns:the expected content length of self.
Return type:int

Get the expected content length of the WebKit2WebExtension.URIResponse. It can be 0 if the server provided an incorrect or missing Content-Length.

get_http_headers()
Returns:a Soup.MessageHeaders with the HTTP headers of self or None if self is not an HTTP response.
Return type:Soup.MessageHeaders

Get the HTTP headers of a WebKit2WebExtension.URIResponse as a Soup.MessageHeaders.

New in version 2.6.

get_mime_type()
Returns:the MIME type of the WebKit2WebExtension.URIResponse
Return type:str
get_status_code()
Returns:the status code of self
Return type:int

Get the status code of the WebKit2WebExtension.URIResponse as returned by the server. It will normally be a Soup.KnownStatusCode, for example Soup.Status.OK, though the server can respond with any unsigned integer.

get_suggested_filename()
Returns:the suggested filename or None if the ‘Content-Disposition’ HTTP header is not present.
Return type:str

Get the suggested filename for self, as specified by the ‘Content-Disposition’ HTTP header, or None if it’s not present.

get_uri()
Returns:the uri of the WebKit2WebExtension.URIResponse
Return type:str

Property Details

WebKit2WebExtension.URIResponse.props.content_length
Name:content-length
Type:int
Default Value:0
Flags:READABLE

The expected content length of the response.

WebKit2WebExtension.URIResponse.props.http_headers
Name:http-headers
Type:Soup.MessageHeaders
Default Value:None
Flags:READABLE

The HTTP headers of the response, or None if the response is not an HTTP response.

New in version 2.6.

WebKit2WebExtension.URIResponse.props.mime_type
Name:mime-type
Type:str
Default Value:None
Flags:READABLE

The MIME type of the response.

WebKit2WebExtension.URIResponse.props.status_code
Name:status-code
Type:int
Default Value:0
Flags:READABLE

The status code of the response as returned by the server.

WebKit2WebExtension.URIResponse.props.suggested_filename
Name:suggested-filename
Type:str
Default Value:None
Flags:READABLE

The suggested filename for the URI response.

WebKit2WebExtension.URIResponse.props.uri
Name:uri
Type:str
Default Value:None
Flags:READABLE

The URI for which the response was made.