Skip to content
Download

statusCode

mach::Reply::statusCode

Returns the reply’s HTTP status code.

Returns the reply’s HTTP status code.

[[nodiscard]] http::StatusCode statusCode() const noexcept;

The reply’s HTTP status code.

This function is noexcept and does not throw exceptions.

This function is thread-safe.

auto status = reply.statusCode();
Name Description
value Returns the reply body.
hasValue Indicates whether the reply contains a body.