roar
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
Roar::Curl::Response Class Reference

This class is returned by a Request class when the request is performed. More...

#include <response.hpp>

Collaboration diagram for Roar::Curl::Response:

Public Member Functions

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?
 

Private Member Functions

 Response (Instance instance)
 Cannot explicitly instantiate, it is made by the Request class.
 

Private Attributes

Instance instance_
 
CURLcode code_
 

Friends

class Request
 

Detailed Description

This class is returned by a Request class when the request is performed.

Constructor & Destructor Documentation

◆ Response()

Roar::Curl::Response::Response ( Instance  instance)
explicitprivate

Cannot explicitly instantiate, it is made by the Request class.

Parameters
instance

Member Function Documentation

◆ 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

Friends And Related Symbol Documentation

◆ Request

friend class Request
friend

Member Data Documentation

◆ 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: