| Version: 3.3.1

Public Member Functions | List of all members
wxWebViewHandlerResponse Class Referenceabstract
Class List by Category » WebView

`#include <wx/webview.h>`

## Detailed Description

A class giving access to various webview response parameters.

Usually a wxWebViewHandler() would set various parameters required for the response like HTTP status, various headers and must then call Finish() to complete the response or call FinishWithError() to abort the request.

Since
  3.3.0

  ##

Library: wxWebView
Category: WebView

See also
  wxWebViewHandler::StartRequest()

## Public Member Functions
virtual void | SetStatus (int status)=0
| Sets the status code of the response. More...
virtual void | SetContentType (const wxString &contentType)=0
| Sets the MIME type of the response. More...
virtual void | SetHeader (const wxString &name, const wxString &value)=0
| Sets a response header which will be sent to the web view. More...
virtual void | Finish (wxSharedPtr< wxWebViewHandlerResponseData > data)=0
| Finishes the request with binary data. More...
virtual void | Finish (const wxString &text, const wxMBConv &conv=wxConvUTF8)
| Finishes the request with text data. More...
virtual void | FinishWithError ()=0
| Finishes the request as an error. More...

## Member Function Documentation

## ◆ Finish() [1/2]

virtual void wxWebViewHandlerResponse::Finish | ( | const wxString & | text,
|  | const wxMBConv & | conv = `wxConvUTF8`
| ) |  |
| virtual

Finishes the request with text data.

Parameters

  text | Text content of the response (can be empty)
  conv | Conversion used when sending the text in the response

See also
  Finish(wxSharedPtr<wxWebViewHandlerResponseData>)

## ◆ Finish() [2/2]

virtual void wxWebViewHandlerResponse::Finish | ( | wxSharedPtr< wxWebViewHandlerResponseData > | data | ) |
| pure virtual

Finishes the request with binary data.

Parameters

  data | The data object will be dereferenced when the request is completed

See also
  Finish(const wxString&, const wxMBConv&)

## ◆ FinishWithError()

virtual void wxWebViewHandlerResponse::FinishWithError | ( |  | ) |
| pure virtual

Finishes the request as an error.

This will notify that the request could not produce any data.

See also
  Finish()

## ◆ SetContentType()

virtual void wxWebViewHandlerResponse::SetContentType | ( | const wxString & | contentType | ) |
| pure virtual

Sets the MIME type of the response.

Parameters

  contentType | MIME type of the response content

## ◆ SetHeader()

virtual void wxWebViewHandlerResponse::SetHeader | ( | const wxString & | name,
|  | const wxString & | value
| ) |  |
| pure virtual

Sets a response header which will be sent to the web view.

The header will be added if it hasn't been set before or replaced otherwise.

Parameters

  name | Name of the header
  value | String value of the header

## ◆ SetStatus()

virtual void wxWebViewHandlerResponse::SetStatus | ( | int | status | ) |
| pure virtual

Sets the status code of the response.

Parameters

  status | HTTP status code