22#include "web/ng/Request.hpp"
24#include <boost/asio/buffer.hpp>
25#include <boost/beast/http/message.hpp>
26#include <boost/beast/http/status.hpp>
27#include <boost/beast/http/string_body.hpp>
28#include <boost/json/object.hpp>
42 std::variant<boost::beast::http::response<boost::beast::http::string_body>, std::string>
data;
64 boost::beast::http::status status,
65 boost::json::object
const&
message,
78 boost::beast::http::status status,
79 boost::json::object
const&
message,
100 boost::beast::http::response<boost::beast::http::string_body> response,
126 setMessage(boost::json::object
const& newMessage);
134 boost::beast::http::response<boost::beast::http::string_body>
143 boost::asio::const_buffer
A class representing a connection to a client.
Definition Connection.hpp:112
Represents an HTTP or WebSocket request.
Definition Request.hpp:37
Response(boost::beast::http::status status, std::string message, Request const &request)
Construct a Response from string. Content type will be text/html.
Definition Response.cpp:115
boost::beast::http::response< boost::beast::http::string_body > intoHttpResponse() &&
Convert the Response to an HTTP response.
Definition Response.cpp:207
boost::asio::const_buffer asWsResponse() const &
Get the message of the response as a const buffer.
Definition Response.cpp:218
std::string const & message() const
Get the message of the response.
Definition Response.cpp:157
void setMessage(std::string newMessage)
Replace existing message (or body) with new message.
Definition Response.cpp:173
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:75