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 HttpRequest { | 7 struct HttpRequest { |
8 string relative_url; // Starts with '/'. Example: "/test?query=foo" | 8 string relative_url; // Starts with '/'. Example: "/test?query=foo" |
9 | 9 |
10 // The HTTP method if applicable. | 10 // The HTTP method if applicable. |
11 string method = "GET"; | 11 string method = "GET"; |
12 | 12 |
13 // Additional HTTP request headers. | 13 // Additional HTTP request headers. |
14 map<string, string>? headers; | 14 map<string, string>? headers; |
15 | 15 |
16 // The payload for the request body. Only set for "POST" or "PUT". | 16 // The payload for the request body. Only set for "POST" or "PUT". |
17 handle<data_pipe_consumer>? body; | 17 handle<data_pipe_consumer>? body; |
18 }; | 18 }; |
OLD | NEW |