Skip to content
Download

body

mach::Response::body

Sets the response body.

Sets the body of the response.

void body(std::string body) noexcept;
Parameter Description
body The body to set.

This function is noexcept and does not throw exceptions.

This function is not thread-safe.

response().body("Hello, world!");
Name Description
body Returns the response body.