00001 #ifndef HTTP_REPLY_HPP
00002 #define HTTP_REPLY_HPP
00003
00004 #include <string>
00005 #include <vector>
00006 #include <boost/asio.hpp>
00007 #include "header.hpp"
00008
00009 namespace http {
00010 namespace server {
00011
00013 struct reply
00014 {
00016 enum status_type
00017 {
00018 ok = 200,
00019 created = 201,
00020 accepted = 202,
00021 no_content = 204,
00022 multiple_choices = 300,
00023 moved_permanently = 301,
00024 moved_temporarily = 302,
00025 not_modified = 304,
00026 bad_request = 400,
00027 unauthorized = 401,
00028 forbidden = 403,
00029 not_found = 404,
00030 internal_server_error = 500,
00031 not_implemented = 501,
00032 bad_gateway = 502,
00033 service_unavailable = 503
00034 } status;
00035
00037 std::vector<header> headers;
00038
00040 std::string content;
00041
00045 std::vector<boost::asio::const_buffer> to_buffers();
00046
00048 static reply stock_reply(status_type status);
00049 };
00050
00051 }
00052 }
00053
00054 #endif // HTTP_REPLY_HPP