KiCad PCB EDA Suite
No Matches
kicad_curl_easy.h File Reference
#include <kicommon.h>
#include <functional>
#include <memory>
#include <ostream>
#include <string>

Go to the source code of this file.




typedef void CURL
typedef std::function< int(size_t, size_t, size_t, size_t)> TRANSFER_CALLBACK
 Wrapper interface around the curl_easy API/. More...

Typedef Documentation


typedef void CURL

Definition at line 42 of file kicad_curl_easy.h.


typedef std::function<int( size_t, size_t, size_t, size_t )> TRANSFER_CALLBACK

Wrapper interface around the curl_easy API/.

Handling of using the curl_easy API to make a request and save the response to a memory buffer

Here is a small example usage:

curl.SetURL( "" );
curl.SetUserAgent( <http-client-identifier> );
curl.SetHeader( "Accept", "application/json" );
int Perform()
Equivalent to curl_easy_perform.
bool SetUserAgent(const std::string &aAgent)
Set the request user agent.
void SetHeader(const std::string &aName, const std::string &aValue)
Set an arbitrary header for the HTTP(s) request.
bool SetURL(const std::string &aURL)
Set the request URL.

Definition at line 63 of file kicad_curl_easy.h.