2026-04-03 04:28:52 -04:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <string>
|
2026-04-03 21:39:59 -04:00
|
|
|
#include <vector>
|
2026-04-03 04:28:52 -04:00
|
|
|
|
|
|
|
|
struct HttpResponse
|
|
|
|
|
{
|
|
|
|
|
int statusCode;
|
|
|
|
|
std::string body;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
class HttpClient
|
|
|
|
|
{
|
|
|
|
|
public:
|
2026-04-03 21:39:59 -04:00
|
|
|
static HttpResponse get(const std::string &url, const std::vector<std::string> &headers = {});
|
|
|
|
|
static HttpResponse post(const std::string &url, const std::string &body, const std::string &contentType = "application/json", const std::vector<std::string> &headers = {});
|
2026-04-03 04:28:52 -04:00
|
|
|
};
|