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 import "network_error.mojom" | 5 import "network_error.mojom" |
6 | 6 |
7 module mojo { | 7 module mojo { |
8 | 8 |
9 struct URLRequest { | 9 struct URLRequest { |
10 string url; | 10 string url; |
11 string method; | 11 string method = "GET"; |
12 string[] headers; | 12 string[] headers; |
13 handle<data_pipe_consumer> body; | 13 handle<data_pipe_consumer> body; |
14 int64 body_length; // Set to -1 if length is unknown. | 14 int64 body_length = 0; // Set to -1 if length is unknown. |
15 bool follow_redirects; | 15 bool follow_redirects = false; |
| 16 bool bypass_cache = false; |
16 }; | 17 }; |
17 | 18 |
18 struct URLResponse { | 19 struct URLResponse { |
19 string url; | 20 string url; |
20 string[] redirects; // The sequence of redirected URLs. | 21 string[] redirects; // The sequence of redirected URLs. |
21 uint32 status_code; | 22 uint32 status_code; |
22 string status_line; | 23 string status_line; |
23 string[] headers; | 24 string[] headers; |
24 }; | 25 }; |
25 | 26 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 59 |
59 // This method is called when the response body has been successfully | 60 // This method is called when the response body has been successfully |
60 // downloaded and copied in its entirety to |response_body_stream|. | 61 // downloaded and copied in its entirety to |response_body_stream|. |
61 // | 62 // |
62 // NOTE: Because |response_body_stream| is limited in size, this event may be | 63 // NOTE: Because |response_body_stream| is limited in size, this event may be |
63 // delayed until |response_body_stream| is consumed. | 64 // delayed until |response_body_stream| is consumed. |
64 OnReceivedEndOfResponseBody(); | 65 OnReceivedEndOfResponseBody(); |
65 }; | 66 }; |
66 | 67 |
67 } | 68 } |
OLD | NEW |