Skip to content
Download

status

mach::Response::status

Returns the response status code.

Returns the HTTP status code used in the response.

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

The response status code.

This function is noexcept and does not throw exceptions.

This function is thread-safe.

auto status = response().status();
Name Description
StatusCode Represents an HTTP status code.
status Sets the response status code.
version Returns the HTTP version.
body Returns the response body.