mastodonpp
0.0.0
|
Return type for API calls. More...
#include <return_types.hpp>
Public Member Functions | |
operator bool () const | |
Returns true if answer::error_code is 0, false otherwise. More... | |
operator string_view () const | |
Returns answer::body as std::string_view. More... | |
Public Attributes | |
uint8_t | error_code |
Error code. More... | |
string | error_message |
The error message. More... | |
uint16_t | http_status |
HTTP status code. More... | |
string | body |
The response from the server, usually JSON. More... | |
Friends | |
std::ostream & | operator<< (std::ostream &out, const answer &answer) |
Returns answer::body as std::ostream. More... | |
|
explicit |
Returns true if answer::error_code is 0, false otherwise.
|
explicit |
|
friend |
string mastodonpp::answer::body |
The response from the server, usually JSON.
uint8_t mastodonpp::answer::error_code |
string mastodonpp::answer::error_message |
The error message.
uint16_t mastodonpp::answer::http_status |
HTTP status code.