3#include "web/ng/Request.hpp"
5#include <boost/asio/buffer.hpp>
6#include <boost/beast/http/message.hpp>
7#include <boost/beast/http/status.hpp>
8#include <boost/beast/http/string_body.hpp>
9#include <boost/json/object.hpp>
23 std::variant<boost::beast::http::response<boost::beast::http::string_body>, std::string>
data;
45 boost::beast::http::status status,
46 boost::json::object
const&
message,
59 boost::beast::http::status status,
60 boost::json::object
const&
message,
81 boost::beast::http::response<boost::beast::http::string_body> response,
107 setMessage(boost::json::object
const& newMessage);
115 boost::beast::http::response<boost::beast::http::string_body>
124 boost::asio::const_buffer
A class representing a connection to a client.
Definition Connection.hpp:93
Represents an HTTP or WebSocket request.
Definition Request.hpp:18
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:96
boost::beast::http::response< boost::beast::http::string_body > intoHttpResponse() &&
Convert the Response to an HTTP response.
Definition Response.cpp:188
boost::asio::const_buffer asWsResponse() const &
Get the message of the response as a const buffer.
Definition Response.cpp:199
std::string const & message() const
Get the message of the response.
Definition Response.cpp:138
void setMessage(std::string newMessage)
Replace existing message (or body) with new message.
Definition Response.cpp:154
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:56