17 #ifndef MASTODONPP_CURL_WRAPPER_HPP
18 #define MASTODONPP_CURL_WRAPPER_HPP
20 #include "return_types.hpp"
22 #include "curl/curl.h"
25 #include <string_view>
31 using std::string_view;
107 char _curl_buffer_error[CURL_ERROR_SIZE];
108 string _curl_buffer_headers;
109 string _curl_buffer_body;
116 static int writer(
char *data,
size_t size,
size_t nmemb,
129 #endif // MASTODONPP_CURL_WRAPPER_HPP
http_method
The HTTP method.
Definition: curl_wrapper.hpp:38
CURLWrapper()
Initializes curl and sets up connection.
Definition: curl_wrapper.cpp:31
C++ wrapper for the Mastodon API.
Definition: api.cpp:19
Return type for Requests.
Definition: return_types.hpp:40
answer_type make_request(const http_method &method, const string_view &uri)
Make a request.
Definition: curl_wrapper.cpp:56
Handles the details of network connections.
Definition: curl_wrapper.hpp:56
virtual ~CURLWrapper() noexcept
Cleans up curl and connection.
Definition: curl_wrapper.cpp:44
CURLWrapper & operator=(const CURLWrapper &other)=default
Copy assignment operator.