ゴミ箱
status.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2016-2017 Vinnie Falco (vinnie dot falco at gmail dot com)
3 //
4 // Distributed under the Boost Software License, Version 1.0. (See accompanying
5 // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
6 //
7 // Official repository: https://github.com/boostorg/beast
8 //
9 
10 #ifndef BOOST_BEAST_HTTP_STATUS_HPP
11 #define BOOST_BEAST_HTTP_STATUS_HPP
12 
13 #include <boost/beast/config.hpp>
15 #include <iosfwd>
16 
17 namespace boost {
18 namespace beast {
19 namespace http {
20 
21 enum class status : unsigned
22 {
30  unknown = 0,
31 
32  continue_ = 100,
33  switching_protocols = 101,
34  processing = 102,
35 
36  ok = 200,
37  created = 201,
38  accepted = 202,
40  no_content = 204,
41  reset_content = 205,
42  partial_content = 206,
43  multi_status = 207,
44  already_reported = 208,
45  im_used = 226,
46 
47  multiple_choices = 300,
48  moved_permanently = 301,
49  found = 302,
50  see_other = 303,
51  not_modified = 304,
52  use_proxy = 305,
53  temporary_redirect = 307,
54  permanent_redirect = 308,
55 
56  bad_request = 400,
57  unauthorized = 401,
58  payment_required = 402,
59  forbidden = 403,
60  not_found = 404,
61  method_not_allowed = 405,
62  not_acceptable = 406,
64  request_timeout = 408,
65  conflict = 409,
66  gone = 410,
67  length_required = 411,
68  precondition_failed = 412,
69  payload_too_large = 413,
70  uri_too_long = 414,
73  expectation_failed = 417,
74  misdirected_request = 421,
76  locked = 423,
77  failed_dependency = 424,
78  upgrade_required = 426,
80  too_many_requests = 429,
85 
87  not_implemented = 501,
88  bad_gateway = 502,
89  service_unavailable = 503,
90  gateway_timeout = 504,
94  loop_detected = 508,
95  not_extended = 510,
98 };
99 
102 enum class status_class : unsigned
103 {
105  unknown = 0,
106 
108  informational = 1,
109 
111  successful = 2,
112 
114  redirection = 3,
115 
117  client_error = 4,
118 
120  server_error = 5,
121 };
122 
128 status
129 int_to_status(unsigned v);
130 
139 to_status_class(unsigned v);
140 
149 
156 
160 
161 } // http
162 } // beast
163 } // boost
164 
166 
167 #endif
std::ostream & operator<<(std::ostream &os, message< isRequest, basic_file_body< File >, Fields > const &msg)=delete
string_view obsolete_reason(status v)
Definition: status.ipp:235
Further action needs to be taken in order to complete the request.
Definition: async_result.hpp:20
detail::ostream_helper< DynamicBuffer, char, std::char_traits< char >, detail::basic_streambuf_movable::value > ostream(DynamicBuffer &buffer)
Definition: ostream.hpp:91
The request contains bad syntax or cannot be fulfilled.
Definition: beast_common.hpp:6
The request was received, continuing processing.
status_class to_status_class(unsigned v)
Definition: status.ipp:221
status_class
Definition: status.hpp:102
The request was successfully received, understood, and accepted.
The server failed to fulfill an apparently valid request.
boost::string_ref string_view
The type of string view used by the library.
Definition: string.hpp:36
status int_to_status(unsigned v)
Definition: status.ipp:214
status
Definition: status.hpp:21