mirror of
https://github.com/johndoe6345789/metabuilder.git
synced 2026-05-03 10:14:52 +00:00
docs: cpp,client,frontends (4 files)
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#pragma once
|
||||
|
||||
#include <cpr/cpr.h>
|
||||
#include <string>
|
||||
|
||||
class HttpClient {
|
||||
public:
|
||||
explicit HttpClient(std::string base_url);
|
||||
|
||||
cpr::Response get(const std::string &path) const;
|
||||
cpr::Response post(const std::string &path,
|
||||
const std::string &body,
|
||||
const std::string &content_type = "application/json") const;
|
||||
|
||||
[[nodiscard]] const std::string &base_url() const noexcept;
|
||||
|
||||
private:
|
||||
std::string base_url_;
|
||||
};
|
||||
Reference in New Issue
Block a user