staticlib_http  1.3.2
 All Classes Namespaces Files Functions Variables
Public Member Functions | List of all members
staticlib::http::multi_threaded_session Class Reference

Thread-safe "session" implementation it can be used for performing HTTP queries from multiple threads simultaneously. More...

#include <staticlib/http/multi_threaded_session.hpp>

Inheritance diagram for staticlib::http::multi_threaded_session:
staticlib::http::session

Public Member Functions

 multi_threaded_session (session_options options=session_options{})
 PIMPL-specific constructor.
virtual resource open_url (const std::string &url, std::unique_ptr< std::istream > post_data, request_options options=request_options{}) override
 Opens specified HTTP url as a Source using POST method.
- Public Member Functions inherited from staticlib::http::session
resource open_url (const std::string &url, request_options opts=request_options{})
 PIMPL-specific constructor.
resource open_url (const std::string &url, std::streambuf *post_data, request_options opts=request_options{})
 Opens specified HTTP url as a Source using POST method.
template<typename PostDataSource , class = typename std::enable_if<!std::is_lvalue_reference<PostDataSource>::value>::type>
resource open_url (const std::string &url, PostDataSource &&post_data, request_options opts=request_options{})
 Opens specified HTTP url as a Source using POST method.
template<typename PostDataSource >
resource open_url (const std::string &url, PostDataSource &post_data, request_options opts=request_options{})
 Opens specified HTTP url as a Source using POST method.

Additional Inherited Members

- Protected Member Functions inherited from staticlib::http::session
 session (session_options opts=session_options{})
 Constructor for inheritors.

Detailed Description

Thread-safe "session" implementation it can be used for performing HTTP queries from multiple threads simultaneously.

Separate thread is used to process session operations. TCP connections are cached where possible and are bound to session object.

Constructor & Destructor Documentation

staticlib::http::multi_threaded_session::multi_threaded_session ( )

PIMPL-specific constructor.

Parameters
pimplimpl object Constructor
optionssession options

Member Function Documentation

virtual resource staticlib::http::multi_threaded_session::open_url ( const std::string &  url,
std::unique_ptr< std::istream >  post_data 
)
overridevirtual

Opens specified HTTP url as a Source using POST method.

Parameters
urlHTTP URL
post_datadata to upload
optionsrequest options
Returns
HTTP resource

Implements staticlib::http::session.


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