| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 280 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 291 * there is no header with the provided name [:null:] will be | 291 * there is no header with the provided name [:null:] will be |
| 292 * returned. If the header has more than one value an exception is | 292 * returned. If the header has more than one value an exception is |
| 293 * thrown. | 293 * thrown. |
| 294 */ | 294 */ |
| 295 String value(String name); | 295 String value(String name); |
| 296 | 296 |
| 297 /** | 297 /** |
| 298 * Adds a header value. The header named [name] will have the value | 298 * Adds a header value. The header named [name] will have the value |
| 299 * [value] added to its list of values. Some headers are single | 299 * [value] added to its list of values. Some headers are single |
| 300 * values and for these adding a value will replace the previous | 300 * values and for these adding a value will replace the previous |
| 301 * value. If the value is of type Date a HTTP date format will be | 301 * value. If the value is of type DateTime a HTTP date format will be |
| 302 * applied. If the value is a [:List:] each element of the list will | 302 * applied. If the value is a [:List:] each element of the list will |
| 303 * be added separately. For all other types the default [:toString:] | 303 * be added separately. For all other types the default [:toString:] |
| 304 * method will be used. | 304 * method will be used. |
| 305 */ | 305 */ |
| 306 void add(String name, Object value); | 306 void add(String name, Object value); |
| 307 | 307 |
| 308 /** | 308 /** |
| 309 * Sets a header. The header named [name] will have all its values | 309 * Sets a header. The header named [name] will have all its values |
| 310 * cleared before the value [value] is added as its value. | 310 * cleared before the value [value] is added as its value. |
| 311 */ | 311 */ |
| (...skipping 24 matching lines...) Expand all Loading... |
| 336 /** | 336 /** |
| 337 * Disable folding for the header named [name] when sending the HTTP | 337 * Disable folding for the header named [name] when sending the HTTP |
| 338 * header. By default, multiple header values are folded into a | 338 * header. By default, multiple header values are folded into a |
| 339 * single header line by separating the values with commas. The | 339 * single header line by separating the values with commas. The |
| 340 * Set-Cookie header has folding disabled by default. | 340 * Set-Cookie header has folding disabled by default. |
| 341 */ | 341 */ |
| 342 void noFolding(String name); | 342 void noFolding(String name); |
| 343 | 343 |
| 344 /** | 344 /** |
| 345 * Gets and sets the date. The value of this property will | 345 * Gets and sets the date. The value of this property will |
| 346 * reflect the "Date" header. | 346 * reflect the "DateTime" header. |
| 347 */ | 347 */ |
| 348 Date date; | 348 DateTime date; |
| 349 | 349 |
| 350 /** | 350 /** |
| 351 * Gets and sets the expiry date. The value of this property will | 351 * Gets and sets the expiry date. The value of this property will |
| 352 * reflect the "Expires" header. | 352 * reflect the "Expires" header. |
| 353 */ | 353 */ |
| 354 Date expires; | 354 DateTime expires; |
| 355 | 355 |
| 356 /** | 356 /** |
| 357 * Gets and sets the 'if-modified-since' date. The value of this property will | 357 * Gets and sets the 'if-modified-since' date. The value of this property will |
| 358 * reflect the "if-modified-since" header. | 358 * reflect the "if-modified-since" header. |
| 359 */ | 359 */ |
| 360 Date ifModifiedSince; | 360 DateTime ifModifiedSince; |
| 361 | 361 |
| 362 /** | 362 /** |
| 363 * Gets and sets the host part of the "Host" header for the | 363 * Gets and sets the host part of the "Host" header for the |
| 364 * connection. | 364 * connection. |
| 365 */ | 365 */ |
| 366 String host; | 366 String host; |
| 367 | 367 |
| 368 /** | 368 /** |
| 369 * Gets and sets the port part of the "Host" header for the | 369 * Gets and sets the port part of the "Host" header for the |
| 370 * connection. | 370 * connection. |
| (...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 String name; | 545 String name; |
| 546 | 546 |
| 547 /** | 547 /** |
| 548 * Gets and sets the value. | 548 * Gets and sets the value. |
| 549 */ | 549 */ |
| 550 String value; | 550 String value; |
| 551 | 551 |
| 552 /** | 552 /** |
| 553 * Gets and sets the expiry date. | 553 * Gets and sets the expiry date. |
| 554 */ | 554 */ |
| 555 Date expires; | 555 DateTime expires; |
| 556 | 556 |
| 557 /** | 557 /** |
| 558 * Gets and sets the max age. A value of [:0:] means delete cookie | 558 * Gets and sets the max age. A value of [:0:] means delete cookie |
| 559 * now. | 559 * now. |
| 560 */ | 560 */ |
| 561 int maxAge; | 561 int maxAge; |
| 562 | 562 |
| 563 /** | 563 /** |
| 564 * Gets and sets the domain. | 564 * Gets and sets the domain. |
| 565 */ | 565 */ |
| (...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1159 class RedirectLimitExceededException extends RedirectException { | 1159 class RedirectLimitExceededException extends RedirectException { |
| 1160 const RedirectLimitExceededException(List<RedirectInfo> redirects) | 1160 const RedirectLimitExceededException(List<RedirectInfo> redirects) |
| 1161 : super("Redirect limit exceeded", redirects); | 1161 : super("Redirect limit exceeded", redirects); |
| 1162 } | 1162 } |
| 1163 | 1163 |
| 1164 | 1164 |
| 1165 class RedirectLoopException extends RedirectException { | 1165 class RedirectLoopException extends RedirectException { |
| 1166 const RedirectLoopException(List<RedirectInfo> redirects) | 1166 const RedirectLoopException(List<RedirectInfo> redirects) |
| 1167 : super("Redirect loop detected", redirects); | 1167 : super("Redirect loop detected", redirects); |
| 1168 } | 1168 } |
| OLD | NEW |