24#ifndef KICAD_CURL_EASY_H_
25#define KICAD_CURL_EASY_H_
85 void SetHeader(
const std::string& aName,
const std::string& aValue );
93 bool SetUserAgent(
const std::string& aAgent );
101 bool SetPostFields(
const std::vector<std::pair<std::string, std::string>>& aFields );
110 bool SetPostFields(
const std::string& aField );
118 bool SetURL(
const std::string& aURL );
127 bool SetFollowRedirects(
bool aFollow );
135 const std::string GetErrorText(
int aCode );
137 int GetTransferTotal( uint64_t& aDownloadedBytes )
const;
145 std::string Escape(
const std::string& aUrl );
147 bool SetTransferCallback(
const TRANSFER_CALLBACK& aCallback,
size_t aInterval );
149 bool SetOutputStream(
const std::ostream* aOutput );
153 int GetResponseStatusCode();
163 template <
typename T>
164 int setOption(
int aOption, T aArg );
std::unique_ptr< CURL_PROGRESS > progress
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/.