Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
- newtype URIResponse = URIResponse (ManagedPtr URIResponse)
- class (GObject o, IsDescendantOf URIResponse o) => IsURIResponse o
- toURIResponse :: (MonadIO m, IsURIResponse o) => o -> m URIResponse
- uRIResponseGetContentLength :: (HasCallStack, MonadIO m, IsURIResponse a) => a -> m Word64
- uRIResponseGetHttpHeaders :: (HasCallStack, MonadIO m, IsURIResponse a) => a -> m MessageHeaders
- uRIResponseGetMimeType :: (HasCallStack, MonadIO m, IsURIResponse a) => a -> m Text
- uRIResponseGetStatusCode :: (HasCallStack, MonadIO m, IsURIResponse a) => a -> m Word32
- uRIResponseGetSuggestedFilename :: (HasCallStack, MonadIO m, IsURIResponse a) => a -> m Text
- uRIResponseGetUri :: (HasCallStack, MonadIO m, IsURIResponse a) => a -> m Text
- getURIResponseContentLength :: (MonadIO m, IsURIResponse o) => o -> m Word64
- getURIResponseHttpHeaders :: (MonadIO m, IsURIResponse o) => o -> m MessageHeaders
- getURIResponseMimeType :: (MonadIO m, IsURIResponse o) => o -> m Text
- getURIResponseStatusCode :: (MonadIO m, IsURIResponse o) => o -> m Word32
- getURIResponseSuggestedFilename :: (MonadIO m, IsURIResponse o) => o -> m Text
- getURIResponseUri :: (MonadIO m, IsURIResponse o) => o -> m Text
Exported types
newtype URIResponse Source #
Memory-managed wrapper type.
URIResponse (ManagedPtr URIResponse) |
Instances
Eq URIResponse Source # | |
Defined in GI.WebKit2WebExtension.Objects.URIResponse (==) :: URIResponse -> URIResponse -> Bool # (/=) :: URIResponse -> URIResponse -> Bool # | |
GObject URIResponse Source # | |
Defined in GI.WebKit2WebExtension.Objects.URIResponse | |
ManagedPtrNewtype URIResponse Source # | |
Defined in GI.WebKit2WebExtension.Objects.URIResponse toManagedPtr :: URIResponse -> ManagedPtr URIResponse | |
TypedObject URIResponse Source # | |
Defined in GI.WebKit2WebExtension.Objects.URIResponse | |
HasParentTypes URIResponse Source # | |
Defined in GI.WebKit2WebExtension.Objects.URIResponse | |
IsGValue (Maybe URIResponse) Source # | Convert |
Defined in GI.WebKit2WebExtension.Objects.URIResponse gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe URIResponse -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe URIResponse) | |
type ParentTypes URIResponse Source # | |
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
(GObject o, IsDescendantOf URIResponse o) => IsURIResponse o Source # | |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getContentLength, getData, getHttpHeaders, getMimeType, getProperty, getQdata, getStatusCode, getSuggestedFilename, getUri.
Setters
getContentLength
uRIResponseGetContentLength Source #
:: (HasCallStack, MonadIO m, IsURIResponse a) | |
=> a |
|
-> m Word64 | Returns: the expected content length of |
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 #
:: (HasCallStack, MonadIO m, IsURIResponse a) | |
=> a |
|
-> m MessageHeaders | Returns: a |
Get the HTTP headers of a URIResponse
as a MessageHeaders
.
Since: 2.6
getMimeType
uRIResponseGetMimeType Source #
:: (HasCallStack, MonadIO m, IsURIResponse a) | |
=> a |
|
-> m Text | Returns: MIME type, as a string. |
Gets the MIME type of the response.
getStatusCode
uRIResponseGetStatusCode Source #
:: (HasCallStack, MonadIO m, IsURIResponse a) | |
=> a |
|
-> m Word32 | Returns: the status code of |
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 #
:: (HasCallStack, MonadIO m, IsURIResponse a) | |
=> a |
|
-> m Text | Returns: the suggested filename or |
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
:: (HasCallStack, MonadIO m, IsURIResponse a) | |
=> a |
|
-> 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