gi-webkit2-4.0.11: WebKit2 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.WebKit2.Objects.WebResource

Contents

Description

 

Synopsis

Exported types

Methods

getData

webResourceGetData Source #

Arguments

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

resource: a WebResource

-> Maybe b

cancellable: a Cancellable or Nothing to ignore

-> Maybe AsyncReadyCallback

callback: a AsyncReadyCallback to call when the request is satisfied

-> m () 

Asynchronously get the raw data for resource.

When the operation is finished, callback will be called. You can then call webResourceGetDataFinish to get the result of the operation.

getDataFinish

webResourceGetDataFinish Source #

Arguments

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

resource: a WebResource

-> b

result: a AsyncResult

-> m ByteString

Returns: a string with the data of resource, or Nothing in case of error. if length is not Nothing, the size of the data will be assigned to it. (Can throw GError)

Finish an asynchronous operation started with webResourceGetData.

getResponse

webResourceGetResponse Source #

Arguments

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

resource: a WebResource

-> m URIResponse

Returns: the URIResponse, or Nothing if the response hasn't been received yet.

Retrieves the URIResponse of the resource load operation. This method returns Nothing if called before the response is received from the server. You can connect to notify::response signal to be notified when the response is received.

getUri

webResourceGetUri Source #

Arguments

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

resource: a WebResource

-> m Text

Returns: the current active URI of resource

Returns the current active URI of resource. The active URI might change during a load operation:

<orderedlist> <listitem><para> When the resource load starts, the active URI is the requested URI </para></listitem> <listitem><para> When the initial request is sent to the server, WebResource::sent-request signal is emitted without a redirected response, the active URI is the URI of the request sent to the server. </para></listitem> <listitem><para> In case of a server redirection, WebResource::sent-request signal is emitted again with a redirected response, the active URI is the URI the request was redirected to. </para></listitem> <listitem><para> When the response is received from the server, the active URI is the final one and it will not change again. </para></listitem> </orderedlist>

You can monitor the active URI by connecting to the notify::uri signal of resource.

Properties

response

data WebResourceResponsePropertyInfo Source #

Instances

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

uri

data WebResourceUriPropertyInfo Source #

Instances

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

Signals

failed

failedWithTlsErrors

finished

receivedData

sentRequest