| Version: 3.3.1

Public Member Functions | Public Attributes | List of all members
wxWebRequestSync::Result Struct Reference

`#include <wx/webrequest.h>`

## Detailed Description

Result of a synchronous operation.

## Public Member Functions
bool | operator! () const
| Returns true if the request failed. More...

## Public Attributes
State | state
| The state of the request. More...
wxString | error
| The error message in case of a failure. More...

## Member Function Documentation

## ◆ operator!()

bool wxWebRequestSync::Result::operator! | ( |  | ) | const

Returns true if the request failed.

Example of use:

const auto result = request.Execute();
if ( !result )
{
wxLogError("Request failed: %s", result.error);
return;
}
wxLogError
void wxLogError(const char *formatString,...)
The functions to use for error messages, i.e.

Note that State_Unauthorized is not considered a failure and needs to be checked separately.

## Member Data Documentation

## ◆ error

wxString wxWebRequestSync::Result::error

The error message in case of a failure.

This field can also be non-empty for State_Unauthorized state.

## ◆ state

State wxWebRequestSync::Result::state

The state of the request.

This field can only take State_Completed, State_Failed or State_Unauthorized values for the synchronous requests.