This class is returned by a Request class when the request is performed.
More...
#include <response.hpp>
|
CURLcode | result () const |
| The CURLcode. Can be useful to check for errors.
|
|
std::string | redirectUrl () const |
| The redirect url if the response was a redirect.
|
|
long long | sizeOfDownload () const |
| The size of the downloaded data.
|
|
long long | sizeOfUpload () const |
| The size of the uploaded data.
|
|
boost::beast::http::status | code () const |
| Response code.
|
|
boost::beast::http::status | proxyCode () const |
| Response code of the proxy if there was one inbetween.
|
|
| operator bool () const |
| Was there a response to the request?
|
|
This class is returned by a Request class when the request is performed.
◆ Response()
Roar::Curl::Response::Response |
( |
Instance |
instance | ) |
|
|
explicitprivate |
Cannot explicitly instantiate, it is made by the Request class.
- Parameters
-
◆ code()
boost::beast::http::status Roar::Curl::Response::code |
( |
| ) |
const |
Response code.
- Returns
- boost::beast::http::status
◆ operator bool()
Roar::Curl::Response::operator bool |
( |
| ) |
const |
|
explicit |
Was there a response to the request?
- Returns
- true When the request was sent successfully and a response was received.
-
false When the request failed and no response was received. This response object is invalid.
◆ proxyCode()
boost::beast::http::status Roar::Curl::Response::proxyCode |
( |
| ) |
const |
Response code of the proxy if there was one inbetween.
- Returns
- boost::beast::http::status
◆ redirectUrl()
std::string Roar::Curl::Response::redirectUrl |
( |
| ) |
const |
The redirect url if the response was a redirect.
- Returns
- std::string
◆ result()
CURLcode Roar::Curl::Response::result |
( |
| ) |
const |
The CURLcode. Can be useful to check for errors.
- Returns
- CURLcode Original CURLcode returned by curl_perform.
◆ sizeOfDownload()
long long Roar::Curl::Response::sizeOfDownload |
( |
| ) |
const |
The size of the downloaded data.
- Returns
- long long
◆ sizeOfUpload()
long long Roar::Curl::Response::sizeOfUpload |
( |
| ) |
const |
The size of the uploaded data.
- Returns
- long long
◆ Request
◆ code_
CURLcode Roar::Curl::Response::code_ |
|
private |
◆ instance_
Instance Roar::Curl::Response::instance_ |
|
private |
The documentation for this class was generated from the following files: