Reqboost::Models::Response class

Constructors, destructors, conversion operators

Response()

Public functions

auto is_redirect() -> bool
True if this Response is a well-formed HTTP redirect that could have been processed automatically (by :meth:Session.resolve_redirects)
auto is_permanent_redirect() -> bool
True if this Response one of the permanent versions of redirect.
void raise_for_status()
Raise an exception for status codes.
auto text() -> std::string
Content of the response in unicode.
auto links() -> std::map<std::string, std::map<std::string, std::string>>
auto __repr__() -> std::string
auto __nonzero__() -> bool
Returns True if :attr:status_code is less than 400.
auto __bool__() -> bool
Returns True if :attr:status_code is less than 400.
auto ok() -> bool
auto apparent_encoding() -> std::string

Public variables

int status_code
std::string _content
std::map<std::string, std::string> headers
std::string url
std::vector<Response> history
std::string encoding
std::string reason
std::map<std::string, std::string> cookies
std::chrono::duration<double> elapsed
std::string request

Function documentation

bool Reqboost::Models::Response::is_redirect()

True if this Response is a well-formed HTTP redirect that could have been processed automatically (by :meth:Session.resolve_redirects)

Returns true

bool Reqboost::Models::Response::is_permanent_redirect()

True if this Response one of the permanent versions of redirect.

Returns true

std::string Reqboost::Models::Response::text()

Content of the response in unicode.

Returns std::string

bool Reqboost::Models::Response::__nonzero__()

Returns True if :attr:status_code is less than 400.

Returns true

bool Reqboost::Models::Response::__bool__()

Returns True if :attr:status_code is less than 400.

Returns true