* Copyright (c) Huawei Technologies Co., Ltd. 2025. All rights reserved.
*/
#ifndef MCP_HTTP_CLIENT_INCLUDE_H_
#define MCP_HTTP_CLIENT_INCLUDE_H_
#include <chrono>
#include <optional>
#include <string>
#include "event/event_system.h"
#include "net/tcp_socket.h"
#include "shared/common_type.h"
#include "shared/http_common.h"
namespace Mcp::Http {
class HttpClient {
public:
HttpClient();
std::optional<HttpResponse> SendRequest(const std::string& host, uint16_t port, const HttpRequest& request,
int timeoutMs = HTTP_CLIENT_DEFAULT_TIMEOUT_MS);
private:
HttpClient(const HttpClient&) = delete;
HttpClient& operator=(const HttpClient&) = delete;
};
}
#endif