gi-soup-2.4.11: Libsoup bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Soup.Objects.Request

Contents

Description

A request to retrieve a particular URI.

Synopsis

Exported types

newtype Request Source #

Constructors

Request (ManagedPtr Request) 

Instances

GObject Request Source # 
IsInitable Request Source # 
IsObject Request Source # 
IsRequest Request Source # 
((~) * info (ResolveRequestMethod t Request), MethodInfo * info Request p) => IsLabel t (Request -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Request -> p #

((~) * info (ResolveRequestMethod t Request), MethodInfo * info Request p) => IsLabelProxy t (Request -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Request -> p #

HasAttributeList * Request Source # 
type AttributeList Request Source # 
type SignalList Request Source # 

Methods

getContentLength

requestGetContentLength Source #

Arguments

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

request: a Request

-> m Int64

Returns: the length of the data represented by request, or -1 if not known.

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 #

Arguments

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

request: a Request

-> m (Maybe Text)

Returns: the type of the data represented by request, or Nothing if not known.

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

requestGetSession Source #

Arguments

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

request: a Request

-> m Session

Returns: request's Session

Gets request's Session

Since: 2.42

getUri

data RequestGetUriMethodInfo Source #

Instances

((~) * signature (m URI), MonadIO m, IsRequest a) => MethodInfo * RequestGetUriMethodInfo a signature Source # 

requestGetUri Source #

Arguments

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

request: a Request

-> m URI

Returns: request's URI

Gets request's URI

Since: 2.42

send

data RequestSendMethodInfo Source #

Instances

((~) * signature (Maybe b -> m InputStream), MonadIO m, IsRequest a, IsCancellable b) => MethodInfo * RequestSendMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy RequestSendMethodInfo a -> signature -> s #

requestSend Source #

Arguments

:: (HasCallStack, MonadIO m, IsRequest a, IsCancellable b) 
=> a

request: a Request

-> Maybe b

cancellable: a Cancellable or Nothing

-> m InputStream

Returns: a InputStream that can be used to read from the URI pointed to by request. (Can throw GError)

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

requestSendAsync Source #

Arguments

:: (HasCallStack, MonadIO m, IsRequest a, IsCancellable b) 
=> a

request: a Request

-> Maybe b

cancellable: a Cancellable or Nothing

-> Maybe AsyncReadyCallback

callback: a 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

requestSendFinish Source #

Arguments

:: (HasCallStack, MonadIO m, IsRequest a, IsAsyncResult b) 
=> a

request: a Request

-> b

result: the AsyncResult

-> m InputStream

Returns: a InputStream that can be used to read from the URI pointed to by request. (Can throw GError)

Gets the result of a requestSendAsync.

Since: 2.42

Properties

session

data RequestSessionPropertyInfo Source #

Instances

AttrInfo RequestSessionPropertyInfo Source # 
type AttrOrigin RequestSessionPropertyInfo Source # 
type AttrLabel RequestSessionPropertyInfo Source # 
type AttrGetType RequestSessionPropertyInfo Source # 
type AttrBaseTypeConstraint RequestSessionPropertyInfo Source # 
type AttrSetTypeConstraint RequestSessionPropertyInfo Source # 
type AttrAllowedOps RequestSessionPropertyInfo Source # 

uri

data RequestUriPropertyInfo Source #

Instances

AttrInfo RequestUriPropertyInfo Source # 
type AttrOrigin RequestUriPropertyInfo Source # 
type AttrLabel RequestUriPropertyInfo Source # 
type AttrGetType RequestUriPropertyInfo Source # 
type AttrBaseTypeConstraint RequestUriPropertyInfo Source # 
type AttrSetTypeConstraint RequestUriPropertyInfo Source # 
type AttrAllowedOps RequestUriPropertyInfo Source #