It derives from <GObject>.
Represents a resource at the end of a URI.
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
web-resource:get-uri and
web-resource:get-response, as
well as the raw data, using web-resource:get-data.
The <WebKitURIResponse> associated with this
resource.
Its value is a <WebKitURIResponse>, or
#f.
It is read only.
The current active URI of the
<WebKitWebResource>. See
web-resource:get-uri for more details.
Its value is a string, or #f.
It is read only.
Asynchronously get the raw data for self.
When the operation is finished, callback will be called. You can
then call web-resource:get-data-finish to get the result of the
operation.
Passed: a <WebKitWebResource>.
Passed, or left out: a <GCancellable>, or
#f.
a <GCancellable> or #f to ignore
Passed, or left out: a procedure, or #f.
a GAsyncReadyCallback to call when
the request is satisfied
See GAsyncReadyCallback for how it
is called.
Not passed: guile-gi supplies it.
the data to pass to callback function
Finish an asynchronous operation started with web-resource:get-data.
Passed: a <WebKitWebResource>.
Passed: a <GAsyncResult>.
Returned: a bytevector.
a string with the data of self, or #f in case of error. if
length is not #f, the size of the data will be assigned to
it.
Not returned: it is the length of %return.
return location for the length of the resource data
Retrieves the <WebKitURIResponse> of the
resource load operation.
This method returns #f 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.
Passed: a <WebKitWebResource>.
Returned: a <WebKitURIResponse>.
the <WebKitURIResponse>, or #f if the
response hasn’t been received yet.
Returns the current active URI of self.
The active URI might change during a load operation:
web-resource:sent-request signal is emitted
without a redirected response, the active URI is the URI of the request
sent to the server.
web-resource:sent-request signal is emitted again with a
redirected response, the active URI is the URI the request was
redirected to.
You can monitor the active URI by connecting to the notify::uri signal of self.
Passed: a <WebKitWebResource>.
Returned: a string.
the current active URI of self
Connect a handler with (connect object web-resource:failed
handler). It is called as (handler self error).
This signal is emitted when an error occurs during the resource load operation.
Passed: a <WebKitWebResource>.
Passed: a <GError>.
the <GError> that was triggered
Connect a handler with (connect object
web-resource:failed-with-tls-errors handler). It is called as
(handler self certificate errors).
This signal is emitted when a TLS error occurs during the resource load operation.
Passed: a <WebKitWebResource>.
Passed: a <GTlsCertificate>.
Passed: a <GTlsCertificateFlags>.
a <GTlsCertificateFlags> with the
verification status of certificate
Connect a handler with (connect object web-resource:finished
handler). It is called as (handler self).
This signal is emitted when the resource load finishes successfully or
due to an error. In case of errors web-resource:failed signal is emitted before this one.
Passed: a <WebKitWebResource>.
Connect a handler with (connect object web-resource:sent-request
handler). It is called as (handler self request
redirected-response).
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.
Passed: a <WebKitWebResource>.
Passed: a <WebKitURIRequest>.
Passed: a <WebKitURIResponse>.
a <WebKitURIResponse>, or #f