gi-webkit2webextension-4.0.28: WebKit2-WebExtension bindings
CopyrightWill Thompson and Iñaki García Etxebarria
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria
Safe HaskellSafe-Inferred
LanguageHaskell2010

GI.WebKit2WebExtension.Objects.URIResponse

Description

Represents an URI response.

A URIResponse contains information such as the URI, the status code, the content length, the mime type, the HTTP status or the suggested filename.

Synopsis

Exported types

newtype URIResponse Source #

Memory-managed wrapper type.

Constructors

URIResponse (ManagedPtr URIResponse) 

Instances

Instances details
Eq URIResponse Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.URIResponse

GObject URIResponse Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.URIResponse

ManagedPtrNewtype URIResponse Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.URIResponse

Methods

toManagedPtr :: URIResponse -> ManagedPtr URIResponse

TypedObject URIResponse Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.URIResponse

Methods

glibType :: IO GType

HasParentTypes URIResponse Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.URIResponse

IsGValue (Maybe URIResponse) Source #

Convert URIResponse to and from GValue. See toGValue and fromGValue.

Instance details

Defined in GI.WebKit2WebExtension.Objects.URIResponse

Methods

gvalueGType_ :: IO GType

gvalueSet_ :: Ptr GValue -> Maybe URIResponse -> IO ()

gvalueGet_ :: Ptr GValue -> IO (Maybe URIResponse)

type ParentTypes URIResponse Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.URIResponse

type ParentTypes URIResponse = '[Object]

class (GObject o, IsDescendantOf URIResponse o) => IsURIResponse o Source #

Type class for types which can be safely cast to URIResponse, for instance with toURIResponse.

Instances

Instances details
(GObject o, IsDescendantOf URIResponse o) => IsURIResponse o Source # 
Instance details

Defined in GI.WebKit2WebExtension.Objects.URIResponse

toURIResponse :: (MonadIO m, IsURIResponse o) => o -> m URIResponse Source #

Cast to URIResponse, for types for which this is known to be safe. For general casts, use castTo.

Methods

getContentLength

uRIResponseGetContentLength Source #

Arguments

:: (HasCallStack, MonadIO m, IsURIResponse a) 
=> a

response: a URIResponse

-> m Word64

Returns: the expected content length of response.

Get the expected content length of the URIResponse.

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

getHttpHeaders

uRIResponseGetHttpHeaders Source #

Arguments

:: (HasCallStack, MonadIO m, IsURIResponse a) 
=> a

response: a URIResponse

-> m MessageHeaders

Returns: a MessageHeaders with the HTTP headers of response or Nothing if response is not an HTTP response.

Get the HTTP headers of a URIResponse as a MessageHeaders.

Since: 2.6

getMimeType

uRIResponseGetMimeType Source #

Arguments

:: (HasCallStack, MonadIO m, IsURIResponse a) 
=> a

response: a URIResponse

-> m Text

Returns: MIME type, as a string.

Gets the MIME type of the response.

getStatusCode

uRIResponseGetStatusCode Source #

Arguments

:: (HasCallStack, MonadIO m, IsURIResponse a) 
=> a

response: a URIResponse

-> m Word32

Returns: the status code of response

Get the status code of the URIResponse.

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

getSuggestedFilename

uRIResponseGetSuggestedFilename Source #

Arguments

:: (HasCallStack, MonadIO m, IsURIResponse a) 
=> a

response: a URIResponse

-> m Text

Returns: the suggested filename or Nothing if the 'Content-Disposition' HTTP header is not present.

Get the suggested filename for response.

Get the suggested filename for response, as specified by the 'Content-Disposition' HTTP header, or Nothing if it's not present.

getUri

uRIResponseGetUri Source #

Arguments

:: (HasCallStack, MonadIO m, IsURIResponse a) 
=> a

response: a URIResponse

-> m Text

Returns: response URI, as a string.

Gets the URI which resulted in the response.

Properties

contentLength

The expected content length of the response.

getURIResponseContentLength :: (MonadIO m, IsURIResponse o) => o -> m Word64 Source #

Get the value of the “content-length” property. When overloading is enabled, this is equivalent to

get uRIResponse #contentLength

httpHeaders

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

Since: 2.6

getURIResponseHttpHeaders :: (MonadIO m, IsURIResponse o) => o -> m MessageHeaders Source #

Get the value of the “http-headers” property. When overloading is enabled, this is equivalent to

get uRIResponse #httpHeaders

mimeType

The MIME type of the response.

getURIResponseMimeType :: (MonadIO m, IsURIResponse o) => o -> m Text Source #

Get the value of the “mime-type” property. When overloading is enabled, this is equivalent to

get uRIResponse #mimeType

statusCode

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

getURIResponseStatusCode :: (MonadIO m, IsURIResponse o) => o -> m Word32 Source #

Get the value of the “status-code” property. When overloading is enabled, this is equivalent to

get uRIResponse #statusCode

suggestedFilename

The suggested filename for the URI response.

getURIResponseSuggestedFilename :: (MonadIO m, IsURIResponse o) => o -> m Text Source #

Get the value of the “suggested-filename” property. When overloading is enabled, this is equivalent to

get uRIResponse #suggestedFilename

uri

The URI for which the response was made.

getURIResponseUri :: (MonadIO m, IsURIResponse o) => o -> m Text Source #

Get the value of the “uri” property. When overloading is enabled, this is equivalent to

get uRIResponse #uri