Skip to content
Download

hasValue

mach::Reply::hasValue

Indicates whether the reply contains a value.

Returns whether the reply contains a value.

[[nodiscard]] bool hasValue() const noexcept;

true if the reply contains a value; otherwise, false.

This function is noexcept and does not throw exceptions.

This function is thread-safe.

if (reply.hasValue()) {
const auto& value = reply.value();
}
Name Description
statusCode Returns the reply’s HTTP status code.
value Returns the reply body.