summaryrefslogtreecommitdiffhomepage
path: root/response.h
blob: 46de9d9a6a4f15972cf723d6dfa34c980b4acddc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#pragma once

#include "server.h"

#include <boost/beast/http.hpp>

#include <exception>
#include <string>

namespace beast = boost::beast;         // from <boost/beast.hpp>
namespace http = beast::http;           // from <boost/beast/http.hpp>

typedef http::request<http::string_body> request_type;
typedef http::response<http::string_body> response_type;

namespace response {

response_type generate_response(request_type& req, Server& server);

// Get host:port e.g. reichwein.it:6543
std::string get_websocket_address(request_type& req, Server& server);

} // namespace