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 a URI scheme response.
If you register a particular URI scheme in a WebContext
,
using webContextRegisterUriScheme
, you have to provide
a URISchemeRequestCallback
. After that, when a URI response
is made with that particular scheme, your callback will be
called. There you will be able to provide more response parameters
when the methods and properties of a URISchemeRequest
is not
enough.
When you finished setting up your URISchemeResponse
, call
webkit_uri_request_finish_with_response()
with it to return the response.
Synopsis
- newtype URISchemeResponse = URISchemeResponse (ManagedPtr URISchemeResponse)
- class (GObject o, IsDescendantOf URISchemeResponse o) => IsURISchemeResponse o
- toURISchemeResponse :: (MonadIO m, IsURISchemeResponse o) => o -> m URISchemeResponse
- uRISchemeResponseNew :: (HasCallStack, MonadIO m, IsInputStream a) => a -> Int64 -> m URISchemeResponse
- uRISchemeResponseSetContentType :: (HasCallStack, MonadIO m, IsURISchemeResponse a) => a -> Text -> m ()
- uRISchemeResponseSetHttpHeaders :: (HasCallStack, MonadIO m, IsURISchemeResponse a) => a -> MessageHeaders -> m ()
- uRISchemeResponseSetStatus :: (HasCallStack, MonadIO m, IsURISchemeResponse a) => a -> Word32 -> Maybe Text -> m ()
- constructURISchemeResponseStream :: (IsURISchemeResponse o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o)
- constructURISchemeResponseStreamLength :: (IsURISchemeResponse o, MonadIO m) => Int64 -> m (GValueConstruct o)
Exported types
newtype URISchemeResponse Source #
Memory-managed wrapper type.
URISchemeResponse (ManagedPtr URISchemeResponse) |
Instances
class (GObject o, IsDescendantOf URISchemeResponse o) => IsURISchemeResponse o Source #
Type class for types which can be safely cast to URISchemeResponse
, for instance with toURISchemeResponse
.
Instances
(GObject o, IsDescendantOf URISchemeResponse o) => IsURISchemeResponse o Source # | |
Defined in GI.WebKit.Objects.URISchemeResponse |
toURISchemeResponse :: (MonadIO m, IsURISchemeResponse o) => o -> m URISchemeResponse Source #
Cast to URISchemeResponse
, 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
getData, getProperty, getQdata.
Setters
setContentType, setData, setDataFull, setHttpHeaders, setProperty, setStatus.
new
:: (HasCallStack, MonadIO m, IsInputStream a) | |
=> a |
|
-> Int64 |
|
-> m URISchemeResponse | Returns: the newly created |
Create a new URISchemeResponse
Since: 2.36
setContentType
uRISchemeResponseSetContentType Source #
:: (HasCallStack, MonadIO m, IsURISchemeResponse a) | |
=> a |
|
-> Text |
|
-> m () |
Sets the content type for the response
Since: 2.36
setHttpHeaders
uRISchemeResponseSetHttpHeaders Source #
:: (HasCallStack, MonadIO m, IsURISchemeResponse a) | |
=> a |
|
-> MessageHeaders |
|
-> m () |
Assign the provided MessageHeaders
to the response.
headers
need to be of the type MessageHeadersTypeResponse
.
Any existing headers will be overwritten.
Since: 2.36
setStatus
uRISchemeResponseSetStatus Source #
:: (HasCallStack, MonadIO m, IsURISchemeResponse a) | |
=> a |
|
-> Word32 |
|
-> Maybe Text |
|
-> m () |
Sets the status code and reason phrase for the response
.
If statusCode
is a known value and reasonPhrase
is Nothing
, the reasonPhrase
will be set automatically.
Since: 2.36
Properties
stream
The input stream to read from.
Since: 2.36
constructURISchemeResponseStream :: (IsURISchemeResponse o, MonadIO m, IsInputStream a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “stream
” property. This is rarely needed directly, but it is used by new
.
streamLength
The input stream length in bytes, -1
for unknown length.
Since: 2.36
constructURISchemeResponseStreamLength :: (IsURISchemeResponse o, MonadIO m) => Int64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “stream-length
” property. This is rarely needed directly, but it is used by new
.