OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP_RESPONSE_H_ | 5 #ifndef NET_TEST_EMBEDDED_TEST_SERVER_HTTP_RESPONSE_H_ |
6 #define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_RESPONSE_H_ | 6 #define NET_TEST_EMBEDDED_TEST_SERVER_HTTP_RESPONSE_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 | 12 |
13 namespace google_apis { | 13 namespace net { |
14 namespace test_server { | 14 namespace test_server { |
15 | 15 |
16 enum ResponseCode { | 16 enum ResponseCode { |
17 SUCCESS = 200, | 17 SUCCESS = 200, |
18 CREATED = 201, | 18 CREATED = 201, |
19 NO_CONTENT = 204, | 19 NO_CONTENT = 204, |
20 MOVED = 301, | 20 MOVED = 301, |
21 RESUME_INCOMPLETE = 308, | 21 RESUME_INCOMPLETE = 308, |
22 NOT_FOUND = 404, | 22 NOT_FOUND = 404, |
23 PRECONDITION = 412, | 23 PRECONDITION = 412, |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // Generates and returns a http response string. | 58 // Generates and returns a http response string. |
59 std::string ToResponseString() const; | 59 std::string ToResponseString() const; |
60 | 60 |
61 private: | 61 private: |
62 ResponseCode code_; | 62 ResponseCode code_; |
63 std::string content_; | 63 std::string content_; |
64 std::string content_type_; | 64 std::string content_type_; |
65 std::map<std::string, std::string> custom_headers_; | 65 std::map<std::string, std::string> custom_headers_; |
66 }; | 66 }; |
67 | 67 |
68 } // namespace test_servers | 68 } // namespace test_server |
69 } // namespace google_apis | 69 } // namespace net |
70 | 70 |
71 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_RESPONSE_H_ | 71 #endif // NET_TEST_EMBEDDED_TEST_SERVER_HTTP_RESPONSE_H_ |
OLD | NEW |