20#ifndef KICAD_HTTP_LIB_CONNECTION_H
21#define KICAD_HTTP_LIB_CONNECTION_H
24#include <boost/algorithm/string.hpp>
78 aCurl->SetHeader(
"Accept",
"application/json" );
79 aCurl->SetHeader(
"Authorization",
"Token " +
m_source.
token );
90 bool boolFromString(
const std::any& aVal,
bool aDefaultValue =
false );
100 std::map<std::string, std::tuple<std::string, std::string>>
m_cache;
const std::string http_endpoint_parts
bool checkServerResponse(std::unique_ptr< KICAD_CURL_EASY > &aCurl)
const std::string http_endpoint_categories
std::map< std::string, std::string > m_parts
static const long DEFAULT_TIMEOUT
const std::string http_endpoint_settings
std::vector< HTTP_LIB_CATEGORY > getCategories() const
bool ValidateHTTPLibraryEndpoints()
std::map< std::string, HTTP_LIB_PART > m_cachedParts
std::unique_ptr< KICAD_CURL_EASY > createCurlEasyObject()
std::map< std::string, std::string > m_categoryDescriptions
bool boolFromString(const std::any &aVal, bool aDefaultValue=false)
bool SelectAll(const HTTP_LIB_CATEGORY &aCategory, std::vector< HTTP_LIB_PART > &aParts)
Retrieves all parts from a specific category from the HTTP library.
std::map< std::string, std::tuple< std::string, std::string > > m_cache
std::vector< HTTP_LIB_CATEGORY > m_categories
bool IsValidEndpoint() const
const std::string http_endpoint_auth
bool SelectOne(const std::string &aPartID, HTTP_LIB_PART &aFetchedPart)
Retrieves a single part with full details from the HTTP library.
wxString httpErrorCodeDescription(uint16_t aHttpCode)
std::string GetLastError() const
std::string getCategoryDescription(const std::string &aCategoryName) const
const char *const traceHTTPLib