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 package org.chromium.net; | 5 package org.chromium.net; |
6 | 6 |
7 import java.io.IOException; | 7 import java.io.IOException; |
8 import java.nio.ByteBuffer; | 8 import java.nio.ByteBuffer; |
9 import java.nio.channels.ReadableByteChannel; | 9 import java.nio.channels.ReadableByteChannel; |
| 10 import java.util.List; |
| 11 import java.util.Map; |
10 | 12 |
11 /** | 13 /** |
12 * HTTP request (GET or POST). | 14 * HTTP request (GET or POST). |
13 */ | 15 */ |
14 public interface HttpUrlRequest { | 16 public interface HttpUrlRequest { |
15 | 17 |
16 public static final int REQUEST_PRIORITY_IDLE = 0; | 18 public static final int REQUEST_PRIORITY_IDLE = 0; |
17 | 19 |
18 public static final int REQUEST_PRIORITY_LOWEST = 1; | 20 public static final int REQUEST_PRIORITY_LOWEST = 1; |
19 | 21 |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 * method returns 200. | 116 * method returns 200. |
115 */ | 117 */ |
116 int getHttpStatusCode(); | 118 int getHttpStatusCode(); |
117 | 119 |
118 /** | 120 /** |
119 * Returns the response header value for the given name or {@code null} if | 121 * Returns the response header value for the given name or {@code null} if |
120 * not found. | 122 * not found. |
121 */ | 123 */ |
122 String getHeader(String name); | 124 String getHeader(String name); |
123 | 125 |
| 126 Map<String, List<String>> getAllHeaders(); |
| 127 |
124 | 128 |
125 /** | 129 /** |
126 * Returns the exception that occurred while executing the request of null | 130 * Returns the exception that occurred while executing the request of null |
127 * if the request was successful. | 131 * if the request was successful. |
128 */ | 132 */ |
129 IOException getException(); | 133 IOException getException(); |
130 } | 134 } |
OLD | NEW |