gi-soup-2.4.14: 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

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

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

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

uri