7#include <boost/beast/core.hpp>
8#include <boost/beast/http.hpp>
9#include <boost/beast/version.hpp>
19 template<
typename Body = boost::beast::http::
string_body,
typename Fields = boost::beast::http::fields>
21 public boost::beast::http::response<Body, Fields>
23 using msg_t = boost::beast::http::response<Body, Fields>;
39 msg_t::operator=(std::move(msg));
48 response(
const boost::beast::http::response_header<Fields>& header) :
59 response(boost::beast::http::response_header<Fields>&& header) :
60 msg_t{ std::move(header) }
72 msg_t::result(status_);
128 status()
const {
return msg_t::result(); }
138 msg_t::insert(malloy::http::field::set_cookie, c.to_string());
149 template<
typename Body,
typename Fields>
152 to_string(
const http::response<Body, Fields>& r)
154 std::ostringstream ss;
Definition: cookie.hpp:20
Definition: response.hpp:22
void set_status(http::status status)
Definition: response.hpp:119
response & operator=(const response &rhs)=default
response(boost::beast::http::response_header< Fields > &&header)
Definition: response.hpp:59
response(msg_t &&msg)
Definition: response.hpp:37
void add_cookie(const cookie &c)
Definition: response.hpp:136
response(const boost::beast::http::response_header< Fields > &header)
Definition: response.hpp:48
response(const response &other)=default
response & operator=(response &&rhs) noexcept=default
http::status status() const
Definition: response.hpp:128
virtual ~response()=default
response(response &&other) noexcept=default
response(const status &status_)
Definition: response.hpp:70
boost::beast::http::status status
Definition: types.hpp:23
Definition: controller.hpp:32
std::string_view to_string(const malloy::http::method method)
Definition: http.hpp:26