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;
91 Response(boost::beast::http::response<boost::beast::http::string_body> response,
Request const& request);
115 setMessage(boost::json::object
const& newMessage);
123 boost::beast::http::response<boost::beast::http::string_body>
132 boost::asio::const_buffer
A class representing a connection to a client.
Definition Connection.hpp:100
Represents an HTTP or WebSocket request.
Definition Request.hpp:37
Represents an HTTP or Websocket response.
Definition Response.hpp:40
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:111
boost::beast::http::response< boost::beast::http::string_body > intoHttpResponse() &&
Convert the Response to an HTTP response.
Definition Response.cpp:180
boost::asio::const_buffer asWsResponse() const &
Get the message of the response as a const buffer.
Definition Response.cpp:188
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:152
This namespace implements the data access layer and related components.
Definition AmendmentCenter.cpp:70