WebResource

A #WebKitWebResource encapsulates content for each resource at the end of a particular URI. For example, one #WebKitWebResource will be created for each separate image and stylesheet when a page is loaded.

You can access the response and the URI for a given #WebKitWebResource, using webkit_web_resource_get_uri() and webkit_web_resource_get_response(), as well as the raw data, using webkit_web_resource_get_data().

Constructors

this
this(WebKitWebResource* webKitWebResource, bool ownedRef)

Sets our main struct and passes it to the parent class.

Members

Functions

addOnFailed
gulong addOnFailed(void delegate(ErrorG, WebResource) dlg, ConnectFlags connectFlags)

This signal is emitted when an error occurs during the resource load operation.

addOnFailedWithTlsErrors
gulong addOnFailedWithTlsErrors(void delegate(TlsCertificate, GTlsCertificateFlags, WebResource) dlg, ConnectFlags connectFlags)

This signal is emitted when a TLS error occurs during the resource load operation.

addOnFinished
gulong addOnFinished(void delegate(WebResource) dlg, ConnectFlags connectFlags)

This signal is emitted when the resource load finishes successfully or due to an error. In case of errors #WebKitWebResource::failed signal is emitted before this one.

addOnReceivedData
gulong addOnReceivedData(void delegate(ulong, WebResource) dlg, ConnectFlags connectFlags)

This signal is emitted after response is received, every time new data has been received. It's useful to know the progress of the resource load operation.

addOnSentRequest
gulong addOnSentRequest(void delegate(URIRequest, URIResponse, WebResource) dlg, ConnectFlags connectFlags)

This signal is emitted when @request has been sent to the server. In case of a server redirection this signal is emitted again with the @request argument containing the new request sent to the server due to the redirection and the @redirected_response parameter containing the response received by the server for the initial request.

getData
void getData(Cancellable cancellable, GAsyncReadyCallback callback, void* userData)

Asynchronously get the raw data for @resource.

getDataFinish
char[] getDataFinish(AsyncResultIF result)

Finish an asynchronous operation started with webkit_web_resource_get_data().

getResponse
URIResponse getResponse()

Retrieves the #WebKitURIResponse of the resource load operation. This method returns %NULL 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.

getStruct
void* getStruct()

the main Gtk struct as a void*

getUri
string getUri()

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

getWebResourceStruct
WebKitWebResource* getWebResourceStruct(bool transferOwnership)

Get the main Gtk struct

Static functions

getType
GType getType()

Variables

webKitWebResource
WebKitWebResource* webKitWebResource;

the main Gtk struct

Meta