pub trait URIResponseExt: 'static {
    fn content_length(&self) -> u64;
    fn mime_type(&self) -> Option<GString>;
    fn status_code(&self) -> u32;
    fn suggested_filename(&self) -> Option<GString>;
    fn uri(&self) -> Option<GString>;
    fn connect_content_length_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_http_headers_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_mime_type_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_status_code_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_suggested_filename_notify<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_uri_notify<F: Fn(&Self) + 'static>(&self, f: F) -> SignalHandlerId; }
Expand description

Trait containing all URIResponse methods.

Implementors

URIResponse

Required Methods

Get the expected content length of the URIResponse.

It can be 0 if the server provided an incorrect or missing Content-Length.

Returns

the expected content length of self.

Gets the MIME type of the response.

Returns

MIME type, as a string.

Get the status code of the URIResponse.

Get the status code of the 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.

Returns

the status code of self

Get the suggested filename for self.

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

Returns

the suggested filename or None if the ‘Content-Disposition’ HTTP header is not present.

Gets the URI which resulted in the response.

Returns

response URI, as a string.

Available on crate feature v2_6 only.

Implementors