OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module mojo; |
| 6 |
| 7 struct URLRequest { |
| 8 // The URL to load. |
| 9 string url; |
| 10 |
| 11 // The HTTP method if applicable. |
| 12 string method = "GET"; |
| 13 |
| 14 // Additional HTTP request headers. |
| 15 array<string>? headers; |
| 16 |
| 17 // The payload for the request body, represented as a concatenation of data |
| 18 // streams. For HTTP requests, the method must be set to "POST" or "PUT". |
| 19 array<handle<data_pipe_consumer>>? body; |
| 20 |
| 21 // The buffer size of the data pipe returned in URLResponse's |body| member. |
| 22 // A value of 0 indicates that the default buffer size should be used. This |
| 23 // value is just a suggestion. The URLLoader may choose to ignore this value. |
| 24 uint32 response_body_buffer_size = 0; |
| 25 |
| 26 // If set to true, then redirects will be automatically followed. Otherwise, |
| 27 // when a redirect is encounterd, FollowRedirect must be called to proceed. |
| 28 bool auto_follow_redirects = false; |
| 29 |
| 30 // If set to true, then the HTTP request will bypass the local cache and will |
| 31 // have a 'Cache-Control: nocache' header added in that causes any proxy |
| 32 // servers to also not satisfy the request from their cache. This has the |
| 33 // effect of forcing a full end-to-end fetch. |
| 34 bool bypass_cache = false; |
| 35 |
| 36 // The referrer request header. |
| 37 string? referrer; |
| 38 }; |
OLD | NEW |