24#ifndef KICAD_CURL_EASY_H_
25#define KICAD_CURL_EASY_H_
42#include <shared_mutex>
86 void SetHeader(
const std::string& aName,
const std::string& aValue );
94 bool SetUserAgent(
const std::string& aAgent );
102 bool SetPostFields(
const std::vector<std::pair<std::string, std::string>>& aFields );
111 bool SetPostFields(
const std::string& aField );
119 bool SetURL(
const std::string& aURL );
128 bool SetFollowRedirects(
bool aFollow );
136 const std::string GetErrorText(
int aCode );
138 int GetTransferTotal( uint64_t& aDownloadedBytes )
const;
146 std::string Escape(
const std::string& aUrl );
148 bool SetTransferCallback(
const TRANSFER_CALLBACK& aCallback,
size_t aInterval );
150 bool SetOutputStream(
const std::ostream* aOutput );
154 int GetResponseStatusCode();
164 template <
typename T>
165 int setOption(
int aOption, T aArg );
std::unique_ptr< CURL_PROGRESS > progress
std::shared_lock< std::shared_mutex > m_curlSharedLock
const std::string & GetBuffer()
Return a reference to the received data buffer.
std::function< int(size_t, size_t, size_t, size_t)> TRANSFER_CALLBACK
Wrapper interface around the curl_easy API/.