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 [DartPackage="mojo"] | |
6 module mojo; | |
7 | |
8 import "mojo/public/interfaces/network/http_header.mojom"; | |
9 import "mojo/public/interfaces/network/network_error.mojom"; | |
10 | |
11 struct URLResponse { | |
12 // If the response resulted in a network level error, this field will be set. | |
13 NetworkError? error; | |
14 | |
15 // The response body stream. Read from this data pipe to receive the bytes of | |
16 // response body. | |
17 handle<data_pipe_consumer>? body; | |
18 | |
19 // The final URL of the response, after redirects have been followed. | |
20 string? url; | |
21 | |
22 // The HTTP status code. 0 if not applicable. | |
23 uint32 status_code; | |
24 | |
25 // The HTTP status line. | |
26 string? status_line; | |
27 | |
28 // The HTTP response headers. | |
29 array<HttpHeader>? headers; | |
30 | |
31 // The MIME type of the response body. | |
32 string? mime_type; | |
33 | |
34 // The character set of the response body. | |
35 string? charset; | |
36 | |
37 // These fields are set to non-NULL if this response corresponds to a | |
38 // redirect. Call the |FollowRedirect| method on the URLLoader instance to | |
39 // follow this redirect. | |
40 string? redirect_method; | |
41 string? redirect_url; | |
42 string? redirect_referrer; | |
43 }; | |
OLD | NEW |