24 #ifndef KICAD_CURL_EASY_H_ 25 #define KICAD_CURL_EASY_H_ 81 void SetHeader(
const std::string& aName,
const std::string& aValue );
99 bool SetURL(
const std::string& aURL );
130 std::string
Escape(
const std::string& aUrl );
141 template <
typename T>
int setOption(
int aOption, T aArg );
149 #endif // KICAD_CURL_EASY_H_ bool SetUserAgent(const std::string &aAgent)
Function SetUserAgent sets the request user agent.
void Perform()
Function perform equivalent to curl_easy_perform.
bool SetFollowRedirects(bool aFollow)
Function SetFollowRedirects enables the following of HTTP(s) and other redirects, by default curl doe...
KICAD_CURL_EASY wrapper interface around the curl_easy API.
int setOption(int aOption, T aArg)
Function setOption sets a curl option, only supports single parameter curl options.
const std::string & GetBuffer()
Function GetBuffer returns a const reference to the recevied data buffer.
std::string Escape(const std::string &aUrl)
Escapes a string for use as a URL.
const std::string GetErrorText(int aCode)
Function GetErrorText fetches CURL's "friendly" error string for a given error code.
bool SetURL(const std::string &aURL)
Function SetURL sets the request URL.
void SetHeader(const std::string &aName, const std::string &aValue)
Function SetHeader sets an arbitrary header for the HTTP(s) request.