Skip to content
Download

value

mach::Reply::value

Returns the reply body.

Returns the value stored in the reply.

[[nodiscard]] const T& value() const;

A reference to the value stored in the reply.

Exception Condition
std::bad_optional_access Thrown if the reply does not contain a value.

This function is thread-safe.

const auto& value = reply.value();
Name Description
statusCode Returns the reply’s HTTP status code.
hasValue Indicates whether the reply contains a body.