value
mach::Reply::value
Returns the reply body.
Description
Section titled “Description”Returns the value stored in the reply.
Syntax
Section titled “Syntax”[[nodiscard]] const T& value() const;Return Value
Section titled “Return Value”A reference to the value stored in the reply.
Exceptions
Section titled “Exceptions”| Exception | Condition |
|---|---|
std::bad_optional_access |
Thrown if the reply does not contain a value. |
Thread Safety
Section titled “Thread Safety”This function is thread-safe.
Example
Section titled “Example”const auto& value = reply.value();See Also
Section titled “See Also”| Name | Description |
|---|---|
statusCode |
Returns the reply’s HTTP status code. |
hasValue |
Indicates whether the reply contains a body. |