OLD | NEW |
---|---|
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 part of dart.io; | 5 part of dart.io; |
6 | 6 |
7 /** | 7 /** |
8 * HTTP status codes. | 8 * HTTP status codes. |
9 */ | 9 */ |
10 abstract class HttpStatus { | 10 abstract class HttpStatus { |
(...skipping 1299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1310 /** | 1310 /** |
1311 * Opens a HTTP connection using the POST method. | 1311 * Opens a HTTP connection using the POST method. |
1312 * | 1312 * |
1313 * The URL to use is specified in [url]. | 1313 * The URL to use is specified in [url]. |
1314 * | 1314 * |
1315 * See [openUrl] for details. | 1315 * See [openUrl] for details. |
1316 */ | 1316 */ |
1317 Future<HttpClientRequest> postUrl(Uri url); | 1317 Future<HttpClientRequest> postUrl(Uri url); |
1318 | 1318 |
1319 /** | 1319 /** |
1320 * Opens a HTTP connection using the PUT method. | |
1321 * | |
1322 * The server is specified using [host] and [port], and the path | |
1323 * (including possible fragment and query) is specified using | |
1324 * [path]. | |
1325 * | |
1326 * See [open] for details. | |
1327 */ | |
1328 Future<HttpClientRequest> put(String host, int port, String path); | |
1329 | |
1330 /** | |
1331 * Opens a HTTP connection using the PUT method. | |
1332 * | |
1333 * The URL to use is specified in [url]. | |
1334 * | |
1335 * See [openUrl] for details. | |
1336 */ | |
1337 Future<HttpClientRequest> putUrl(Uri url); | |
1338 | |
1339 /** | |
1340 * Opens a HTTP connection using the DELETE method. | |
1341 * | |
1342 * The server is specified using [host] and [port], and the path | |
1343 * (including possible fragment and query) is specified using | |
1344 * [path]. | |
1345 * | |
1346 * See [open] for details. | |
1347 */ | |
1348 Future<HttpClientRequest> delete(String host, int port, String path); | |
1349 | |
1350 /** | |
1351 * Opens a HTTP connection using the DELETE method. | |
1352 * | |
1353 * The URL to use is specified in [url]. | |
1354 * | |
1355 * See [openUrl] for details. | |
1356 */ | |
1357 Future<HttpClientRequest> deleteUrl(Uri url); | |
1358 | |
1359 /** | |
Lasse Reichstein Nielsen
2014/04/22 08:49:47
Please also add "HEAD" support.
I don't think TRAC
Anders Johnsen
2014/04/22 10:58:36
Done.
| |
1320 * Sets the function to be called when a site is requesting | 1360 * Sets the function to be called when a site is requesting |
1321 * authentication. The URL requested and the security realm from the | 1361 * authentication. The URL requested and the security realm from the |
1322 * server are passed in the arguments [url] and [realm]. | 1362 * server are passed in the arguments [url] and [realm]. |
1323 * | 1363 * |
1324 * The function returns a [Future] which should complete when the | 1364 * The function returns a [Future] which should complete when the |
1325 * authentication has been resolved. If credentials cannot be | 1365 * authentication has been resolved. If credentials cannot be |
1326 * provided the [Future] should complete with [:false:]. If | 1366 * provided the [Future] should complete with [:false:]. If |
1327 * credentials are available the function should add these using | 1367 * credentials are available the function should add these using |
1328 * [addCredentials] before completing the [Future] with the value | 1368 * [addCredentials] before completing the [Future] with the value |
1329 * [:true:]. | 1369 * [:true:]. |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1833 class RedirectException implements HttpException { | 1873 class RedirectException implements HttpException { |
1834 final String message; | 1874 final String message; |
1835 final List<RedirectInfo> redirects; | 1875 final List<RedirectInfo> redirects; |
1836 | 1876 |
1837 const RedirectException(this.message, this.redirects); | 1877 const RedirectException(this.message, this.redirects); |
1838 | 1878 |
1839 String toString() => "RedirectException: $message"; | 1879 String toString() => "RedirectException: $message"; |
1840 | 1880 |
1841 Uri get uri => redirects.last.location; | 1881 Uri get uri => redirects.last.location; |
1842 } | 1882 } |
OLD | NEW |