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