response.h
Go to the documentation of this file.
1 #ifndef CPR_RESPONSE_H
2 #define CPR_RESPONSE_H
3 
4 #include <cstdint>
5 #include <string>
6 
7 #include "cpr/cookies.h"
8 #include "cpr/cprtypes.h"
9 #include "cpr/defines.h"
10 #include "cpr/error.h"
11 
12 namespace cpr {
13 
14 class Response {
15  public:
16  Response() = default;
17 
18  template <typename TextType, typename HeaderType, typename UrlType, typename CookiesType,
19  typename ErrorType>
20  Response(const std::int32_t& p_status_code, TextType&& p_text, HeaderType&& p_header, UrlType&& p_url,
21  const double& p_elapsed, CookiesType&& p_cookies = Cookies{},
22  ErrorType&& p_error = Error{})
23  : status_code{p_status_code}, text{CPR_FWD(p_text)}, header{CPR_FWD(p_header)},
24  url{CPR_FWD(p_url)}, elapsed{p_elapsed}, cookies{CPR_FWD(p_cookies)},
25  error{CPR_FWD(p_error)} {}
26 
27  std::int32_t status_code;
31  double elapsed;
34 };
35 
36 } // namespace cpr
37 
38 #endif
Header header
Definition: response.h:29
std::string Url
Definition: cprtypes.h:14
Error error
Definition: response.h:33
::std::string string
Definition: gtest-port.h:1129
std::string text
Definition: response.h:28
double elapsed
Definition: response.h:31
Response(const std::int32_t &p_status_code, TextType &&p_text, HeaderType &&p_header, UrlType &&p_url, const double &p_elapsed, CookiesType &&p_cookies=Cookies{}, ErrorType &&p_error=Error{})
Definition: response.h:20
#define CPR_FWD(...)
Definition: defines.h:6
Response()=default
std::int32_t status_code
Definition: response.h:27
Definition: auth.cpp:3
Cookies cookies
Definition: response.h:32


rc_tagdetect_client
Author(s): Monika Florek-Jasinska , Raphael Schaller
autogenerated on Sat Feb 13 2021 03:42:16