roar
Loading...
Searching...
No Matches
response.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "instance.hpp"
4
5#include <curl/curl.h>
6#include <boost/beast/http/status.hpp>
7
8#include <string>
9
10namespace Roar::Curl
11{
16 {
17 private:
18 friend class Request;
19
24 explicit Response(Instance instance);
25
26 public:
31 CURLcode result() const;
32
37 std::string redirectUrl() const;
38
43 long long sizeOfDownload() const;
44
49 long long sizeOfUpload() const;
50
55 boost::beast::http::status code() const;
56
61 boost::beast::http::status proxyCode() const;
62
69 explicit operator bool() const;
70
71 private:
73 CURLcode code_;
74 };
75}
Definition instance.hpp:11
Definition request.hpp:36
This class is returned by a Request class when the request is performed.
Definition response.hpp:16
std::string redirectUrl() const
The redirect url if the response was a redirect.
Definition response.cpp:19
boost::beast::http::status proxyCode() const
Response code of the proxy if there was one inbetween.
Definition response.cpp:51
boost::beast::http::status code() const
Response code.
Definition response.cpp:43
Instance instance_
Definition response.hpp:72
long long sizeOfUpload() const
The size of the uploaded data.
Definition response.cpp:35
CURLcode code_
Definition response.hpp:73
long long sizeOfDownload() const
The size of the downloaded data.
Definition response.cpp:27
CURLcode result() const
The CURLcode. Can be useful to check for errors.
Definition response.cpp:15
Definition curl_error.hpp:9