Add default arguments for api_* endpoints to prevent segfaults

main
Simon Quigley 6 days ago
parent 1cbe4ceb29
commit 3c42ec0a64

@ -69,13 +69,13 @@ public:
// API Methods
std::optional<archive> get_archive(const std::string& distribution_name);
std::optional<std::string> api_get(const std::string& endpoint, const std::map<std::string, std::string>& params = {}) const;
std::optional<std::string> api_post(const std::string& endpoint,
std::optional<std::string> api_get(const std::string& endpoint = "", const std::map<std::string, std::string>& params = {}) const;
std::optional<std::string> api_post(const std::string& endpoint = "",
const std::map<std::string, std::string>& params,
bool build_endpoint = true,
const std::string& token_secret_override = "");
std::optional<std::string> api_patch(const std::string& endpoint, const nlohmann::json& data);
std::optional<std::string> api_delete(const std::string& endpoint);
std::optional<std::string> api_patch(const std::string& endpoint = "", const nlohmann::json& data);
std::optional<std::string> api_delete(const std::string& endpoint = "");
std::string build_full_url(const std::string& endpoint) const;

Loading…
Cancel
Save