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 request.
If you register a particular URI scheme in a WebContext
,
using webContextRegisterUriScheme
, you have to provide
a URISchemeRequestCallback
. After that, when a URI request
is made with that particular scheme, your callback will be
called. There you will be able to access properties such as the
scheme, the URI and path, and the WebView
that initiated the
request, and also finish the request with
uRISchemeRequestFinish
.
Synopsis
- newtype URISchemeRequest = URISchemeRequest (ManagedPtr URISchemeRequest)
- class (GObject o, IsDescendantOf URISchemeRequest o) => IsURISchemeRequest o
- toURISchemeRequest :: (MonadIO m, IsURISchemeRequest o) => o -> m URISchemeRequest
- uRISchemeRequestFinish :: (HasCallStack, MonadIO m, IsURISchemeRequest a, IsInputStream b) => a -> b -> Int64 -> Maybe Text -> m ()
- uRISchemeRequestFinishError :: (HasCallStack, MonadIO m, IsURISchemeRequest a) => a -> GError -> m ()
- uRISchemeRequestFinishWithResponse :: (HasCallStack, MonadIO m, IsURISchemeRequest a, IsURISchemeResponse b) => a -> b -> m ()
- uRISchemeRequestGetHttpBody :: (HasCallStack, MonadIO m, IsURISchemeRequest a) => a -> m InputStream
- uRISchemeRequestGetHttpHeaders :: (HasCallStack, MonadIO m, IsURISchemeRequest a) => a -> m MessageHeaders
- uRISchemeRequestGetHttpMethod :: (HasCallStack, MonadIO m, IsURISchemeRequest a) => a -> m Text
- uRISchemeRequestGetPath :: (HasCallStack, MonadIO m, IsURISchemeRequest a) => a -> m Text
- uRISchemeRequestGetScheme :: (HasCallStack, MonadIO m, IsURISchemeRequest a) => a -> m Text
- uRISchemeRequestGetUri :: (HasCallStack, MonadIO m, IsURISchemeRequest a) => a -> m Text
- uRISchemeRequestGetWebView :: (HasCallStack, MonadIO m, IsURISchemeRequest a) => a -> m WebView
Exported types
newtype URISchemeRequest Source #
Memory-managed wrapper type.
URISchemeRequest (ManagedPtr URISchemeRequest) |
Instances
class (GObject o, IsDescendantOf URISchemeRequest o) => IsURISchemeRequest o Source #
Type class for types which can be safely cast to URISchemeRequest
, for instance with toURISchemeRequest
.
Instances
(GObject o, IsDescendantOf URISchemeRequest o) => IsURISchemeRequest o Source # | |
Defined in GI.WebKit2.Objects.URISchemeRequest |
toURISchemeRequest :: (MonadIO m, IsURISchemeRequest o) => o -> m URISchemeRequest Source #
Cast to URISchemeRequest
, 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, finish, finishError, finishWithResponse, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getData, getHttpBody, getHttpHeaders, getHttpMethod, getPath, getProperty, getQdata, getScheme, getUri, getWebView.
Setters
finish
uRISchemeRequestFinish Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a, IsInputStream b) | |
=> a |
|
-> b |
|
-> Int64 |
|
-> Maybe Text |
|
-> m () |
Finish a URISchemeRequest
by setting the contents of the request and its mime type.
finishError
uRISchemeRequestFinishError Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a) | |
=> a |
|
-> GError |
|
-> m () |
Finish a URISchemeRequest
with a GError
.
Since: 2.2
finishWithResponse
uRISchemeRequestFinishWithResponse Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a, IsURISchemeResponse b) | |
=> a |
|
-> b |
|
-> m () |
Finish a URISchemeRequest
by returning a URISchemeResponse
Since: 2.36
getHttpBody
uRISchemeRequestGetHttpBody Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a) | |
=> a |
|
-> m InputStream | Returns: (nullable): the body of the |
Get the request body.
Since: 2.40
getHttpHeaders
uRISchemeRequestGetHttpHeaders Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a) | |
=> a |
|
-> m MessageHeaders | Returns: the |
Get the MessageHeaders
of the request.
Since: 2.36
getHttpMethod
uRISchemeRequestGetHttpMethod Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a) | |
=> a |
|
-> m Text | Returns: the HTTP method of the |
Get the HTTP method of the request
.
Since: 2.36
getPath
uRISchemeRequestGetPath Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a) | |
=> a |
|
-> m Text | Returns: the URI path of |
Get the URI path of request
.
getScheme
uRISchemeRequestGetScheme Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a) | |
=> a |
|
-> m Text | Returns: the URI scheme of |
Get the URI scheme of request
.
getUri
uRISchemeRequestGetUri Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a) | |
=> a |
|
-> m Text | Returns: the full URI of |
Get the URI of request
.
getWebView
uRISchemeRequestGetWebView Source #
:: (HasCallStack, MonadIO m, IsURISchemeRequest a) | |
=> a |
|
-> m WebView | Returns: the |
Get the WebView
that initiated the request.