Reqboost::Sessions::Session class

Constructors, destructors, conversion operators

Session()
~Session()

Public functions

auto request(const std::string& method, const std::string& url, const py::kwargs kwargs) -> Models::Response
Base request method.
auto get(const std::string& url, const py::dict params = py::none(), py::kwargs kwargs = {}) -> Models::Response
GET request.
auto post(const std::string& url, const py::dict data = py::none(), py::kwargs kwargs = {}) -> Models::Response
POST request.
auto put(const std::string& url, const py::dict data = py::none(), py::kwargs kwargs = {}) -> Models::Response
PUT request.
auto patch(const std::string& url, const py::dict data = py::none(), py::kwargs kwargs = {}) -> Models::Response
PATCH request.
auto delete_(const std::string& url, py::kwargs kwargs = {}) -> Models::Response
DELETE request.
auto head(const std::string& url, py::kwargs kwargs = {}) -> Models::Response
HEAD request.
auto options(const std::string& url, py::kwargs kwargs = {}) -> Models::Response
OPTIONS request.
auto __enter__() -> Session*
Handles the enter method of the Session class.
void __exit__(const py::object& exc_type, const py::object& exc_value, const py::object& traceback)
Handles python side of the exit method.

Function documentation

Models::Response Reqboost::Sessions::Session::request(const std::string& method, const std::string& url, const py::kwargs kwargs)

Base request method.

Parameters
method
url
kwargs
Returns Models::Response

Models::Response Reqboost::Sessions::Session::get(const std::string& url, const py::dict params = py::none(), py::kwargs kwargs = {})

GET request.

Parameters
url
params
kwargs
Returns Models::Response

Models::Response Reqboost::Sessions::Session::post(const std::string& url, const py::dict data = py::none(), py::kwargs kwargs = {})

POST request.

Parameters
url
data
kwargs
Returns Models::Response

Models::Response Reqboost::Sessions::Session::put(const std::string& url, const py::dict data = py::none(), py::kwargs kwargs = {})

PUT request.

Parameters
url
data
kwargs
Returns Models::Response

Models::Response Reqboost::Sessions::Session::patch(const std::string& url, const py::dict data = py::none(), py::kwargs kwargs = {})

PATCH request.

Parameters
url
data
kwargs
Returns Models::Response

Models::Response Reqboost::Sessions::Session::delete_(const std::string& url, py::kwargs kwargs = {})

DELETE request.

Parameters
url
kwargs
Returns Models::Response

Models::Response Reqboost::Sessions::Session::head(const std::string& url, py::kwargs kwargs = {})

HEAD request.

Parameters
url
kwargs
Returns Models::Response

Models::Response Reqboost::Sessions::Session::options(const std::string& url, py::kwargs kwargs = {})

OPTIONS request.

Parameters
url
kwargs
Returns Models::Response

Session* Reqboost::Sessions::Session::__enter__()

Handles the enter method of the Session class.

Returns Session*

void Reqboost::Sessions::Session::__exit__(const py::object& exc_type, const py::object& exc_value, const py::object& traceback)

Handles python side of the exit method.

Parameters
exc_type
exc_value
traceback