Skip to content
Download

body

mach::Response::body

Returns the response body.

Returns the body of the response.

[[nodiscard]] const std::string& body() const noexcept;

A reference to the response body.

This function is noexcept and does not throw exceptions.

This function is thread-safe.

const auto& body = response().body();
Name Description
body Sets the response body.
status Returns the response status code.
version Returns the HTTP version.