status
mach::Response::status
Returns the response status code.
Description
Section titled “Description”Returns the HTTP status code used in the response.
Syntax
Section titled “Syntax”[[nodiscard]] http::StatusCode status() const noexcept;Return Value
Section titled “Return Value”The response status code.
Exceptions
Section titled “Exceptions”This function is noexcept and does not throw exceptions.
Thread Safety
Section titled “Thread Safety”This function is thread-safe.
Example
Section titled “Example”auto status = response().status();See Also
Section titled “See Also”| Name | Description |
|---|---|
StatusCode |
Represents an HTTP status code. |
status |
Sets the response status code. |
version |
Returns the HTTP version. |
body |
Returns the response body. |