body
mach::Response::body
Returns the response body.
Description
Section titled “Description”Returns the body of the response.
Syntax
Section titled “Syntax”[[nodiscard]] const std::string& body() const noexcept;Return Value
Section titled “Return Value”A reference to the response body.
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”const auto& body = response().body();See Also
Section titled “See Also”| Name | Description |
|---|---|
body |
Sets the response body. |
status |
Returns the response status code. |
version |
Returns the HTTP version. |