Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(826)

Unified Diff: runtime/bin/http.dart

Issue 9602011: Add handling of HTTP header "Expires" (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed review comments Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/http.dart
diff --git a/runtime/bin/http.dart b/runtime/bin/http.dart
index 3a707414efd2ce355c3bb16e56b301c9ef44b64e..8a5097acceaf9c74db8da4be6934dd3378a029d5 100644
--- a/runtime/bin/http.dart
+++ b/runtime/bin/http.dart
@@ -177,6 +177,12 @@ interface HttpResponse default _HttpResponse {
String reasonPhrase;
/**
+ * Gets and sets the expiry date. The value of this property will
+ * reflect the "Expires" header
+ */
+ Date expires;
+
+ /**
* Sets a header on the response. NOTE: If the same header name is
* set more than once only the last value will be part of the
* response.
@@ -366,6 +372,14 @@ interface HttpClientResponse default _HttpClientResponse {
bool get keepAlive();
/**
+ * Returns the date value for the "Expires" header. Returns null if
+ * the response has no "Expires" header. Throws a HttpException if
+ * the response has an "Expires" header which is not formatted as a
+ * valid HTTP date.
+ */
+ Date get expires();
+
+ /**
* Returns the response headers.
*/
Map<String, String> get headers();
« no previous file with comments | « no previous file | runtime/bin/http_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698