17 #ifndef MASTODONPP_CURL_WRAPPER_HPP
18 #define MASTODONPP_CURL_WRAPPER_HPP
22 #include "curl/curl.h"
26 #include <string_view>
35 using std::string_view;
144 char _curl_buffer_error[CURL_ERROR_SIZE];
145 string _curl_buffer_headers;
146 string _curl_buffer_body;
153 static int writer(
char *data,
size_t size,
size_t nmemb,
166 #endif // MASTODONPP_CURL_WRAPPER_HPP
http_method
The HTTP method.
Definition: curl_wrapper.hpp:44
CURLWrapper()
Initializes curl and sets up connection.
Definition: curl_wrapper.cpp:35
CURL * get_curl_easy_handle()
Returns pointer to the CURL easy handle.
Definition: curl_wrapper.hpp:125
C++ wrapper for the Mastodon API.
Definition: answer.cpp:19
Return type for Requests.
Definition: answer.hpp:40
answer_type make_request(const http_method &method, const string_view &uri)
Make a request.
Definition: curl_wrapper.cpp:60
map< string, variant< string, vector< string > >> parametermap
std::map of parameters for API calls.
Definition: curl_wrapper.hpp:67
Handles the details of network connections.
Definition: curl_wrapper.hpp:78
virtual ~CURLWrapper() noexcept
Cleans up curl and connection.
Definition: curl_wrapper.cpp:48
CURLWrapper & operator=(const CURLWrapper &other)=default
Copy assignment operator.