47using Result = std::expected<Response, Error>;
auto perform(Request const &request) -> Result
Primary easy API.
std::expected< Response, Error > Result
Result of a fetch operation.
Definition easy.hpp:47
CurlCode
Definition curl_code.hpp:6
Definition byte_array.hpp:7
Error of a perform operation.
Definition easy.hpp:10
CurlCode code
Code returned by libcurl.
Definition easy.hpp:12
std::string text
Error text.
Definition easy.hpp:14
Input parameter for perform().
Definition easy.hpp:18
Flag flags
Request flags.
Definition easy.hpp:35
Flag
Definition easy.hpp:19
@ SkipPeerVerification
Definition easy.hpp:21
@ None
Definition easy.hpp:20
@ SkipHostnameVerification
Definition easy.hpp:22
std::string url
URL to fetch. Must be a valid URL.
Definition easy.hpp:26
std::vector< std::string > headers
List of HTTP headers, if any.
Definition easy.hpp:33
std::string post_fields
Concatenated string of post fields, if any.
Definition easy.hpp:31
std::string user_agent
User agent to use, if any.
Definition easy.hpp:29
Successful response of a perform operation.
Definition easy.hpp:39
ByteArray bytes
Response payload as bytes.
Definition easy.hpp:43
std::int64_t code
Response code.
Definition easy.hpp:41