SMACC2
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | List of all members
cl_http::http_session_base Class Referenceabstract

#include <http_session_base.hpp>

Inheritance diagram for cl_http::http_session_base:
Inheritance graph
Collaboration diagram for cl_http::http_session_base:
Collaboration graph

Public Types

using TResponse = boost::beast::http::response< boost::beast::http::string_body >
 

Public Member Functions

virtual ~http_session_base ()
 
virtual void run (const std::string &host, const std::string &target, const boost::beast::http::verb http_method, const int &version)=0
 
virtual std::string getPort ()=0
 
virtual void setBody (const std::string &body)=0
 
virtual void setHeaders (const std::unordered_map< std::string, std::string > &headers)=0
 

Protected Member Functions

virtual void on_resolve (boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type results)=0
 
virtual void fail (boost::beast::error_code ec, const char *what)=0
 
virtual void on_connect (boost::beast::error_code ec, boost::asio::ip::tcp::resolver::results_type::endpoint_type)=0
 
virtual void on_write (boost::beast::error_code ec, std::size_t bytes_transferred)=0
 
virtual void on_read (boost::beast::error_code ec, std::size_t bytes_transferred)=0
 
virtual void on_handshake (boost::beast::error_code ec)
 
virtual void on_shutdown (boost::beast::error_code ec)
 

Detailed Description

Definition at line 34 of file http_session_base.hpp.

Member Typedef Documentation

◆ TResponse

using cl_http::http_session_base::TResponse = boost::beast::http::response<boost::beast::http::string_body>

Definition at line 39 of file http_session_base.hpp.

Constructor & Destructor Documentation

◆ ~http_session_base()

virtual cl_http::http_session_base::~http_session_base ( )
inlinevirtual

Definition at line 37 of file http_session_base.hpp.

37{}

Member Function Documentation

◆ fail()

virtual void cl_http::http_session_base::fail ( boost::beast::error_code  ec,
const char *  what 
)
protectedpure virtual

◆ getPort()

virtual std::string cl_http::http_session_base::getPort ( )
pure virtual

◆ on_connect()

virtual void cl_http::http_session_base::on_connect ( boost::beast::error_code  ec,
boost::asio::ip::tcp::resolver::results_type::endpoint_type   
)
protectedpure virtual

◆ on_handshake()

virtual void cl_http::http_session_base::on_handshake ( boost::beast::error_code  ec)
inlineprotectedvirtual

Reimplemented in cl_http::ssl_http_session.

Definition at line 60 of file http_session_base.hpp.

60{}

◆ on_read()

virtual void cl_http::http_session_base::on_read ( boost::beast::error_code  ec,
std::size_t  bytes_transferred 
)
protectedpure virtual

◆ on_resolve()

virtual void cl_http::http_session_base::on_resolve ( boost::beast::error_code  ec,
boost::asio::ip::tcp::resolver::results_type  results 
)
protectedpure virtual

◆ on_shutdown()

virtual void cl_http::http_session_base::on_shutdown ( boost::beast::error_code  ec)
inlineprotectedvirtual

Reimplemented in cl_http::ssl_http_session.

Definition at line 61 of file http_session_base.hpp.

61{}

◆ on_write()

virtual void cl_http::http_session_base::on_write ( boost::beast::error_code  ec,
std::size_t  bytes_transferred 
)
protectedpure virtual

◆ run()

virtual void cl_http::http_session_base::run ( const std::string &  host,
const std::string &  target,
const boost::beast::http::verb  http_method,
const int &  version 
)
pure virtual

◆ setBody()

virtual void cl_http::http_session_base::setBody ( const std::string &  body)
pure virtual

◆ setHeaders()

virtual void cl_http::http_session_base::setHeaders ( const std::unordered_map< std::string, std::string > &  headers)
pure virtual

The documentation for this class was generated from the following file: