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

Unified Diff: runtime/bin/http.dart

Issue 9500014: Add statusCode and reasonPhrase getters and setters to the HttpResponse interface (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 10 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 2969b76a98cb6fc2ebed7ebc6a351cf1754762af..67541f78879e0bb13788d0fa829c12925273c464 100644
--- a/runtime/bin/http.dart
+++ b/runtime/bin/http.dart
@@ -166,6 +166,21 @@ interface HttpResponse default _HttpResponse {
bool get keepAlive();
/**
+ * Gets and sets the status code. Any integer value is accepted, but
+ * for the official HTTP status codes use the fields from
+ * [HttpStatus].
+ */
+ int get statusCode();
Mads Ager (google) 2012/02/29 12:34:12 These in the interface should just be int statusC
Søren Gjesse 2012/02/29 12:50:07 Good point. Did the same for contentLength and kee
+ void set statusCode(int statusCode);
+
+ /**
+ * Gets and sets the reason phrase. If no reason phrase is explicitly
+ * set a default reason phrase is provided.
+ */
+ String get reasonPhrase();
+ void set reasonPhrase(String reasonPhrase);
+
+ /**
* 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.
« 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