WebKitURISchemeResponse: WPE Reference Manual

## WebKitURISchemeResponse WebKitURISchemeResponse — Represents a URI scheme response |

## Functions

WebKitURISchemeResponse * | webkit_uri_scheme_response_new ()
void | webkit_uri_scheme_response_set_content_type ()
void | webkit_uri_scheme_response_set_status ()
void | webkit_uri_scheme_response_set_http_headers ()

## Properties

GInputStream * | stream | Write / Construct Only
gint64 | stream-length | Write / Construct Only

## Types and Values

struct | WebKitURISchemeResponse

## Object Hierarchy

        GObject
        ╰── WebKitURISchemeResponse

## Description

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.

## Functions

### webkit_uri_scheme_response_new ()

    WebKitURISchemeResponse *
    webkit_uri_scheme_response_new (GInputStream *input_stream,
                                    gint64 stream_length);

Create a new WebKitURISchemeResponse

#### Parameters

input_stream | a GInputStream to read the contents of the request |
stream_length | the length of the stream or -1 if not known |

#### Returns

the newly created WebKitURISchemeResponse.

[transfer full]

Since: 2.36

### webkit_uri_scheme_response_set_content_type ()

    void
    webkit_uri_scheme_response_set_content_type
                                   (WebKitURISchemeResponse *response,
                                    const gchar *content_type);

Sets the content type for the `response`

#### Parameters

response | a WebKitURISchemeResponse |
content_type | the content type of the stream |

Since: 2.36

### webkit_uri_scheme_response_set_status ()

    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.

#### Parameters

response | a WebKitURISchemeResponse |
status_code | the HTTP status code to be returned |
reason_phrase | a reason phrase. | [allow-none]

Since: 2.36

### webkit_uri_scheme_response_set_http_headers ()

    void
    webkit_uri_scheme_response_set_http_headers
                                   (WebKitURISchemeResponse *response,
                                    SoupMessageHeaders *headers);

## Types and Values

### struct WebKitURISchemeResponse

    struct WebKitURISchemeResponse;

## Property Details

### The `“stream”` property

      “stream”                   GInputStream *

The input stream to read from.

Owner: WebKitURISchemeResponse

Flags: Write / Construct Only

Since: 2.36

### The `“stream-length”` property

      “stream-length”            gint64

The input stream length in bytes. -1 for unknown length.

Owner: WebKitURISchemeResponse

Flags: Write / Construct Only

Allowed values: >= -1

Default value: -1