Top |
If you register a particular URI scheme in a WebKitWebContext,
using webkit_web_context_register_uri_scheme()
, you have to provide
a WebKitURISchemeRequestCallback. After that, when a URI response
is made with that particular scheme, your callback will be
called. There you will be able to provide more response parameters
when the methods and properties of a WebKitURISchemeRequest is not
enough.
When you finished setting up your WebKitURISchemeResponse, call
webkit_uri_request_finish_with_response()
with it to return the response.
WebKitURISchemeResponse * webkit_uri_scheme_response_new (GInputStream *input_stream
,gint64 stream_length
);
Create a new WebKitURISchemeResponse
input_stream |
a GInputStream to read the contents of the request |
|
stream_length |
the length of the stream or -1 if not known |
Since: 2.36
void webkit_uri_scheme_response_set_content_type (WebKitURISchemeResponse *response
,const gchar *content_type
);
Sets the content type for the response
Since: 2.36
void webkit_uri_scheme_response_set_status (WebKitURISchemeResponse *response
,guint status_code
,const gchar *reason_phrase
);
Sets the status code and reason phrase for the response
.
If status_code
is a known value and reason_phrase
is NULL
, the reason_phrase
will be set automatically.
response |
||
status_code |
the HTTP status code to be returned |
|
reason_phrase |
a reason phrase. |
[allow-none] |
Since: 2.36
void webkit_uri_scheme_response_set_http_headers (WebKitURISchemeResponse *response
,SoupMessageHeaders *headers
);
“stream”
property “stream” GInputStream *
The input stream to read from.
Owner: WebKitURISchemeResponse
Flags: Write / Construct Only
Since: 2.36