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 mojo; | 5 module mojo; |
6 | 6 |
7 import "network/public/interfaces/http_message.mojom"; | 7 import "network/public/interfaces/http_message.mojom"; |
8 import "network/public/interfaces/network_error.mojom"; | 8 import "network/public/interfaces/network_error.mojom"; |
9 | 9 |
10 struct URLRequest { | 10 struct URLRequest { |
(...skipping 30 matching lines...) Expand all Loading... | |
41 // If the response resulted in a network level error, this field will be set. | 41 // If the response resulted in a network level error, this field will be set. |
42 NetworkError? error; | 42 NetworkError? error; |
43 | 43 |
44 // The response body stream. Read from this data pipe to receive the bytes of | 44 // The response body stream. Read from this data pipe to receive the bytes of |
45 // response body. | 45 // response body. |
46 handle<data_pipe_consumer>? body; | 46 handle<data_pipe_consumer>? body; |
47 | 47 |
48 // The final URL of the response, after redirects have been followed. | 48 // The final URL of the response, after redirects have been followed. |
49 string? url; | 49 string? url; |
50 | 50 |
51 // The site of the URL used for determine what process this resource should | |
jam
2015/07/10 16:12:00
nit: since this a generic fetch api, better not to
Fady Samuel
2015/07/10 16:16:08
Done.
| |
52 // live in. | |
53 string? site; | |
54 | |
51 // The HTTP status code. 0 if not applicable. | 55 // The HTTP status code. 0 if not applicable. |
52 uint32 status_code; | 56 uint32 status_code; |
53 | 57 |
54 // The HTTP status line. | 58 // The HTTP status line. |
55 string? status_line; | 59 string? status_line; |
56 | 60 |
57 // The HTTP response headers. | 61 // The HTTP response headers. |
58 array<HttpHeader>? headers; | 62 array<HttpHeader>? headers; |
59 | 63 |
60 // The MIME type of the response body. | 64 // The MIME type of the response body. |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
92 Start(URLRequest request) => (URLResponse response); | 96 Start(URLRequest request) => (URLResponse response); |
93 | 97 |
94 // If the request passed to |Start| had |auto_follow_redirects| set to false, | 98 // If the request passed to |Start| had |auto_follow_redirects| set to false, |
95 // then upon receiving an URLResponse with a non-NULL |redirect_url| field, | 99 // then upon receiving an URLResponse with a non-NULL |redirect_url| field, |
96 // |FollowRedirect| may be called to load the URL indicated by the redirect. | 100 // |FollowRedirect| may be called to load the URL indicated by the redirect. |
97 FollowRedirect() => (URLResponse response); | 101 FollowRedirect() => (URLResponse response); |
98 | 102 |
99 // Query status about the URLLoader. | 103 // Query status about the URLLoader. |
100 QueryStatus() => (URLLoaderStatus status); | 104 QueryStatus() => (URLLoaderStatus status); |
101 }; | 105 }; |
OLD | NEW |