#include </cygdrive/c/Users/Hamis/Cygwin-packaging/wxWidgets3.1/wxWidgets3.1-3.1.5-2.x86_64/src/wxWidgets-3.1.5/interface/wx/webrequest.h>
A wxWebResponse allows access to the response sent by the server.
<>< =''>:</>&;&;< =''>\ </></>
Public Member Functions | |
wxWebResponse () | |
Default constructor creates an invalid object. | |
bool | IsOk () const |
Check if the object is valid. | |
wxString | GetURL () const |
Returns the final URL. | |
wxString | GetHeader (const wxString &name) const |
Returns a header from the response or an empty string if the header could not be found. | |
wxFileOffset | GetContentLength () const |
Get the length of returned data if available. | |
wxString | GetMimeType () const |
Returns the MIME type of the response (if available). | |
int | GetStatus () const |
Returns the status code returned by the server. | |
wxString | GetStatusText () const |
Returns the status text of the response. | |
wxInputStream * | GetStream () |
Returns a stream which represents the response data sent by the server. | |
wxString | GetSuggestedFileName () const |
Returns a suggested filename for the response data. | |
wxString | GetDataFile () const |
Returns the full path of the file to which data is being saved. | |
wxString | AsString () const |
Returns all response data as a string. | |
wxWebResponse::wxWebResponse | ( | ) |
Default constructor creates an invalid object.
Initialize it by assigning wxWebRequest::GetResponse() to it before using it.
wxString wxWebResponse::AsString | ( | ) | const |
Returns all response data as a string.
This is mostly useful for debugging or diagnostics.
wxFileOffset wxWebResponse::GetContentLength | ( | ) | const |
Get the length of returned data if available.
Returns the value specified in the Content-Length
: response header of -1
if not available.
wxString wxWebResponse::GetDataFile | ( | ) | const |
Returns the full path of the file to which data is being saved.
This is only valid when storage mode is Storage_File
.
Returns a header from the response or an empty string if the header could not be found.
name | Name of the header field |
wxString wxWebResponse::GetMimeType | ( | ) | const |
Returns the MIME type of the response (if available).
int wxWebResponse::GetStatus | ( | ) | const |
Returns the status code returned by the server.
wxString wxWebResponse::GetStatusText | ( | ) | const |
Returns the status text of the response.
wxInputStream * wxWebResponse::GetStream | ( | ) |
Returns a stream which represents the response data sent by the server.
wxString wxWebResponse::GetSuggestedFileName | ( | ) | const |
Returns a suggested filename for the response data.
wxString wxWebResponse::GetURL | ( | ) | const |
Returns the final URL.
This URL might be different than the request URL when a redirection occurred.
bool wxWebResponse::IsOk | ( | ) | const |
Check if the object is valid.
No other methods can be used if this function returns false.