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.
Added in version 4.3/wxWidgets-3.3.0.
See also
wx.html2.WebViewHandler.StartRequest
Class Hierarchy¶
Methods Summary¶
Finishes the request as an error. |
|
Sets the MIME type of the response. |
|
Sets a response header which will be sent to the web view. |
|
Sets the status code of the response. |
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) –
HTTPstatus code- Return type:
None