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 |
A request to retrieve a particular URI.
Since: 2.42
Synopsis
- newtype Request = Request (ManagedPtr Request)
- class (GObject o, IsDescendantOf Request o) => IsRequest o
- toRequest :: (MonadIO m, IsRequest o) => o -> m Request
- requestGetContentLength :: (HasCallStack, MonadIO m, IsRequest a) => a -> m Int64
- requestGetContentType :: (HasCallStack, MonadIO m, IsRequest a) => a -> m (Maybe Text)
- requestGetSession :: (HasCallStack, MonadIO m, IsRequest a) => a -> m Session
- requestGetUri :: (HasCallStack, MonadIO m, IsRequest a) => a -> m URI
- requestSend :: (HasCallStack, MonadIO m, IsRequest a, IsCancellable b) => a -> Maybe b -> m InputStream
- requestSendAsync :: (HasCallStack, MonadIO m, IsRequest a, IsCancellable b) => a -> Maybe b -> Maybe AsyncReadyCallback -> m ()
- requestSendFinish :: (HasCallStack, MonadIO m, IsRequest a, IsAsyncResult b) => a -> b -> m InputStream
- constructRequestSession :: (IsRequest o, MonadIO m, IsSession a) => a -> m (GValueConstruct o)
- getRequestSession :: (MonadIO m, IsRequest o) => o -> m Session
- constructRequestUri :: (IsRequest o, MonadIO m) => URI -> m (GValueConstruct o)
- getRequestUri :: (MonadIO m, IsRequest o) => o -> m URI
Exported types
Memory-managed wrapper type.
Instances
Eq Request Source # | |
GObject Request Source # | |
Defined in GI.Soup.Objects.Request | |
ManagedPtrNewtype Request Source # | |
Defined in GI.Soup.Objects.Request toManagedPtr :: Request -> ManagedPtr Request | |
TypedObject Request Source # | |
Defined in GI.Soup.Objects.Request | |
HasParentTypes Request Source # | |
Defined in GI.Soup.Objects.Request | |
IsGValue (Maybe Request) Source # | Convert |
Defined in GI.Soup.Objects.Request gvalueGType_ :: IO GType gvalueSet_ :: Ptr GValue -> Maybe Request -> IO () gvalueGet_ :: Ptr GValue -> IO (Maybe Request) | |
type ParentTypes Request Source # | |
Defined in GI.Soup.Objects.Request type ParentTypes Request = '[Object, Initable] |
class (GObject o, IsDescendantOf Request o) => IsRequest o Source #
Instances
(GObject o, IsDescendantOf Request o) => IsRequest o Source # | |
Defined in GI.Soup.Objects.Request |
Methods
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, init, isFloating, notify, notifyByPspec, ref, refSink, runDispose, send, sendAsync, sendFinish, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getContentLength, getContentType, getData, getProperty, getQdata, getSession, getUri.
Setters
getContentLength
requestGetContentLength Source #
:: (HasCallStack, MonadIO m, IsRequest a) | |
=> a |
|
-> m Int64 | Returns: the length of the data represented by |
Gets the length of the data represented by request
. For most
request types, this will not be known until after you call
requestSend
or requestSendFinish
.
Since: 2.42
getContentType
requestGetContentType Source #
:: (HasCallStack, MonadIO m, IsRequest a) | |
=> a |
|
-> m (Maybe Text) | Returns: the type of the data represented by
|
Gets the type of the data represented by request
. For most request
types, this will not be known until after you call
requestSend
or requestSendFinish
.
As in the HTTP Content-Type header, this may include parameters after the MIME type.
Since: 2.42
getSession
:: (HasCallStack, MonadIO m, IsRequest a) | |
=> a |
|
-> m Session | Returns: |
Gets request
's Session
Since: 2.42
getUri
:: (HasCallStack, MonadIO m, IsRequest a) | |
=> a |
|
-> m URI | Returns: |
Gets request
's URI
Since: 2.42
send
:: (HasCallStack, MonadIO m, IsRequest a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> m InputStream | Returns: a |
Synchronously requests the URI pointed to by request
, and returns
a InputStream
that can be used to read its contents.
Note that you cannot use this method with SoupRequests
attached to
a SessionAsync
.
Since: 2.42
sendAsync
:: (HasCallStack, MonadIO m, IsRequest a, IsCancellable b) | |
=> a |
|
-> Maybe b |
|
-> Maybe AsyncReadyCallback |
|
-> m () |
Begins an asynchronously request for the URI pointed to by
request
.
Note that you cannot use this method with SoupRequests
attached to
a SessionSync
.
Since: 2.42
sendFinish
:: (HasCallStack, MonadIO m, IsRequest a, IsAsyncResult b) | |
=> a |
|
-> b |
|
-> m InputStream | Returns: a |
Gets the result of a requestSendAsync
.
Since: 2.42
Properties
session
The request's Session
.
Since: 2.42
constructRequestSession :: (IsRequest o, MonadIO m, IsSession a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “session
” property. This is rarely needed directly, but it is used by new
.
getRequestSession :: (MonadIO m, IsRequest o) => o -> m Session Source #
Get the value of the “session
” property.
When overloading is enabled, this is equivalent to
get
request #session
uri
The request URI.
Since: 2.42
constructRequestUri :: (IsRequest o, MonadIO m) => URI -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “uri
” property. This is rarely needed directly, but it is used by new
.
getRequestUri :: (MonadIO m, IsRequest o) => o -> m URI Source #
Get the value of the “uri
” property.
When overloading is enabled, this is equivalent to
get
request #uri