4#include "../http/connection_t.hpp"
5#include "../http/request_generator_t.hpp"
6#include "../../core/http/generator.hpp"
7#include "../../core/http/request.hpp"
8#include "../../core/http/response.hpp"
9#include "../../core/http/types.hpp"
14namespace malloy::server
23 template<
typename... Bodies>
24 using response_t = std::variant<malloy::http::response<Bodies>...>;
26 template<
typename... Bodies>
27 using writer_t = std::function<void(
const boost::beast::http::request_header<>&, std::variant<
malloy::http::response<Bodies>...>&&,
const http::connection_t&)>;
29 using handle_retr = std::optional<malloy::http::response<boost::beast::http::string_body>>;
30 using req_header_t = boost::beast::http::request_header<>;
31 using req_t = http::request_generator_t;
54 bool matches(
const req_header_t& req)
const
56 return method == req.method();
67 handle_retr
handle(
const req_t& req,
const http::connection_t& conn)
const = 0;
Definition: response.hpp:22
boost::beast::http::verb method
Definition: types.hpp:18
Definition: endpoint_http.hpp:22
virtual handle_retr handle(const req_t &req, const http::connection_t &conn) const =0
virtual bool matches(const req_header_t &req) const
Definition: endpoint_http.hpp:54
Definition: endpoint.hpp:10