24#include <boost/asio/executor_work_guard.hpp>
25#include <boost/asio/strand.hpp>
26#include <boost/beast/core.hpp>
27#include <boost/beast/http.hpp>
28#include <boost/beast/ssl.hpp>
29#include <boost/beast/version.hpp>
39 using TResponse = boost::beast::http::response<boost::beast::http::string_body>;
43 const std::string & host,
const std::string & target,
44 const boost::beast::http::verb http_method,
const int & version) = 0;
47 virtual void setBody(
const std::string & body) = 0;
48 virtual void setHeaders(
const std::unordered_map<std::string, std::string> & headers) = 0;
52 boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results) = 0;
53 virtual void fail(boost::beast::error_code ec,
const char * what) = 0;
55 boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type::endpoint_type) = 0;
56 virtual void on_write(boost::beast::error_code ec, std::size_t bytes_transferred) = 0;
57 virtual void on_read(boost::beast::error_code ec, std::size_t bytes_transferred) = 0;
virtual void setBody(const std::string &body)=0
virtual void on_connect(boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type::endpoint_type)=0
virtual void setHeaders(const std::unordered_map< std::string, std::string > &headers)=0
virtual void on_shutdown(boost::beast::error_code ec)
virtual void on_write(boost::beast::error_code ec, std::size_t bytes_transferred)=0
virtual std::string getPort()=0
virtual void on_resolve(boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results)=0
virtual ~http_session_base()
virtual void fail(boost::beast::error_code ec, const char *what)=0
virtual void on_read(boost::beast::error_code ec, std::size_t bytes_transferred)=0
boost::beast::http::response< boost::beast::http::string_body > TResponse
virtual void run(const std::string &host, const std::string &target, const boost::beast::http::verb http_method, const int &version)=0
virtual void on_handshake(boost::beast::error_code ec)