Represents HTTP(s) response.
More...
#include <http.hpp>
Represents HTTP(s) response.
HTTP_Response::HTTP_Response |
( |
int |
status, |
|
|
const std::string & |
reason, |
|
|
std::string & |
body |
|
) |
| |
|
noexcept |
Creates HTTP Response.
- Parameters
-
status | Status code of Request. |
reason | Reason description. |
body | Content of response. Moved. |
const std::string & HTTP_Response::body |
( |
| ) |
const |
- Returns
- Content of response.
HTTP_Response::operator bool |
( |
| ) |
const |
- Returns
- Whether response is success or not.
- Return values
-
true | If response code is either 200 or 201 |
false | Otherwise. |
HTTP_Response::operator std::string |
( |
| ) |
const |
|
explicit |
String representation of HTTP Response.
Can be used as debug information.
HTTP_Response::operator! |
( |
| ) |
const |
- Returns
- Whether response is failure or not.
const std::string & HTTP_Response::reason |
( |
| ) |
const |
- Returns
- Reason description of status code.
int HTTP_Response::status |
( |
| ) |
const |
- Returns
- Status code of response.
The documentation for this class was generated from the following files: