phoenix_title wx.html2.WebViewHandlerResponse

A class giving access to various webview response parameters.

Usually a wx.html2.WebViewHandler 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.

wx.html2.WebView

Added in version 4.3/wxWidgets-3.3.0.

See also

wx.html2.WebViewHandler.StartRequest


class_hierarchy Class Hierarchy

Inheritance diagram of WebViewHandlerResponse


method_summary Methods Summary

FinishWithError

Finishes the request as an error.

SetContentType

Sets the MIME type of the response.

SetHeader

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

SetStatus

Sets the status code of the response.


api Class API

class wx.html2.WebViewHandlerResponse(object)

A class giving access to various webview response parameters.


Methods

FinishWithError(self)

Finishes the request as an error.

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

Return type:

None

See also

Finish



SetContentType(self, contentType)

Sets the MIME type of the response.

Parameters:

contentType (string) – MIME type of the response content

Return type:

None



SetHeader(self, name, value)

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 (string) – Name of the header

  • value (string) – String value of the header

Return type:

None



SetStatus(self, status)

Sets the status code of the response.

Parameters:

status (int) – HTTP status code

Return type:

None