Realistic 3D camera system
3D camera system components
reply.hpp
Go to the documentation of this file.
1 //
2 // reply.hpp
3 // ~~~~~~~~~
4 //
5 // Copyright (c) 2003-2015 Christopher M. Kohlhoff (chris at kohlhoff dot com)
6 //
7 // Distributed under the Boost Software License, Version 1.0. (See accompanying
8 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
9 //
10 
11 #ifndef HTTP_SERVER4_REPLY_HPP
12 #define HTTP_SERVER4_REPLY_HPP
13 
14 #include <string>
15 #include <vector>
16 #include <asio.hpp>
17 #include "header.hpp"
18 
19 namespace http {
20 namespace server4 {
21 
23 struct reply
24 {
27  {
28  ok = 200,
29  created = 201,
30  accepted = 202,
31  no_content = 204,
35  not_modified = 304,
36  bad_request = 400,
37  unauthorized = 401,
38  forbidden = 403,
39  not_found = 404,
42  bad_gateway = 502,
44  } status;
45 
47  std::vector<header> headers;
48 
50  std::string content;
51 
55  std::vector<asio::const_buffer> to_buffers();
56 
59 };
60 
61 } // namespace server4
62 } // namespace http
63 
64 #endif // HTTP_SERVER4_REPLY_HPP
static reply stock_reply(status_type status)
Get a stock reply.
Definition: reply.cpp:242
std::string content
The content to be sent in the reply.
Definition: reply.hpp:50
status_type
The status of the reply.
Definition: reply.hpp:26
std::vector< header > headers
The headers to be included in the reply.
Definition: reply.hpp:47
std::vector< asio::const_buffer > to_buffers()
Definition: reply.cpp:103
enum http::server4::reply::status_type status
A reply to be sent to a client.
Definition: reply.hpp:23