#include <wx/webrequest.h>
Base class for logging debug information from web requests.
An object of a class derived from this one may be associated with a wxWebSession or wxWebSessionSync using wxWebSession::SetDebugLogger() in order to receive detailed information about the data exchanged with the HTTP server.
Once this object is associated with a session, its member functions will be called to report various events happening during the request processing.
libcurl-based backend provides the most full-featured logging, with WinHTTP backend providing only limited information and NSURLSession-based backend currently not providing any logging at all.
Public Member Functions | |
| wxWebRequestDebugLogger ()=default | |
| Default constructor. | |
| virtual void | OnInfo (const wxString &info)=0 |
| Called to notify about an informational message. | |
| virtual void | OnRequestSent (const wxString &line)=0 |
| Called with the request line sent to the server. | |
| virtual void | OnResponseReceived (const wxString &line)=0 |
| Called with the status line received from the server. | |
| virtual void | OnHeaderSent (const wxString &name, const wxString &value)=0 |
| Called for each header sent to the server. | |
| virtual void | OnHeaderReceived (const wxString &name, const wxString &value)=0 |
| Called for each header received from the server. | |
| virtual void | OnDataSent (const void *data, size_t size)=0 |
| Called when other data is sent to the server. | |
| virtual void | OnDataReceived (const void *data, size_t size)=0 |
| Called when other data is received from the server. | |
|
default |
Default constructor.
|
pure virtual |
Called when other data is received from the server.
This data may be binary and encrypted when using HTTPS, so it is typically not human-readable, although it may be in some cases (e.g. when receiving a text response body).
|
pure virtual |
Called when other data is sent to the server.
This data may be binary and encrypted when using HTTPS, so it is typically not human-readable, although it may be in some cases (e.g. when using a text body with HTTP POST).
This is currently only called when libcurl-based backend is used or when WinHTTP backend is used with synchronous requests.
|
pure virtual |
Called for each header received from the server.
| name | Name of the header |
| value | String value of the header |
|
pure virtual |
Called for each header sent to the server.
This is currently only called when libcurl-based backend is used.
| name | Name of the header |
| value | String value of the header |
|
pure virtual |
Called to notify about an informational message.
For example, the libcurl-based backend provides details about the protocol used (including TLS version when applicable) and the connection state using this function.
| info | A single line informational message. |
|
pure virtual |
Called with the request line sent to the server.
A typical example of such a line would be GET /index.html HTTP/1.1.
|
pure virtual |
Called with the status line received from the server.
A typical example of such a line would be HTTP/1.1 200 OK.