OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 module http_server; | 5 module http_server; |
6 | 6 |
7 struct HttpResponse { | 7 struct HttpResponse { |
8 // The HTTP status code. | 8 // The HTTP status code. |
9 uint32 status_code = 200; | 9 uint32 status_code = 200; |
10 | 10 |
11 // The payload for the response body. | 11 // The payload for the response body. |
12 handle<data_pipe_consumer>? body; | 12 handle<data_pipe_consumer>? body; |
13 | 13 |
14 // This must be the number of bytes in |body|. | 14 // This must be the number of bytes in |body|. |
15 int64 content_length = 0; | 15 int64 content_length = 0; |
16 | 16 |
17 // The content type. | 17 // The content type. |
18 string content_type = "text/html; charset=utf-8"; | 18 string content_type = "text/html; charset=utf-8"; |
19 | 19 |
20 // Additional HTTP response headers. | 20 // Additional HTTP response headers. |
21 map<string, string>? custom_headers; | 21 map<string, string>? custom_headers; |
22 }; | 22 }; |
OLD | NEW |