29: connectionManager_(nullptr), sessionManager_(nullptr)
42 const HttpMethod method,
const std::string & path,
const std::string & body,
43 const std::unordered_map<std::string, std::string> & headers)
45 auto path_used = path;
46 if (path.empty() || path[0] !=
'/')
48 path_used =
"/" + path;
52 this->
getLogger(),
"Executing request: SSL=%d Server=%s Path=%s Port=%s",
59 session->setBody(body);
60 session->setHeaders(headers);
boost::asio::any_io_executor getStrand()
http_session_base::TResponse TResponse
CpHttpSessionManager * sessionManager_
smacc2::SmaccSignal< void(const TResponse &)> onResponseReceived_
void onInitialize() override
std::function< void(TResponse)> responseHandler_
virtual ~CpHttpRequestExecutor()
CpHttpConnectionManager * connectionManager_
static constexpr int HTTP_VERSION
void executeRequest(const HttpMethod method, const std::string &path="/", const std::string &body="", const std::unordered_map< std::string, std::string > &headers={})
std::string getPort() const
std::string getServerName() const
std::shared_ptr< http_session_base > createSession(boost::asio::any_io_executor executor, std::function< void(const http_session_base::TResponse &)> callback)
rclcpp::Logger getLogger() const