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

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: Addressed review comments 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..d8d2c73511edf506d2dd7bca7d47a3a9083c4d49 100644
--- a/runtime/bin/http.dart
+++ b/runtime/bin/http.dart
@@ -154,16 +154,27 @@ interface HttpResponse default _HttpResponse {
* the response is not known in advance set the content length to
* -1 - which is also the default if not set.
*/
- void set contentLength(int contentLength);
- int get contentLength();
+ int contentLength;
/**
* Gets and sets the keep alive state of the connection. If the
* associated request have a keep alive state of false setting keep
* alive to true will have no effect.
*/
- void set keepAlive(bool keepAlive);
- bool get keepAlive();
+ bool 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 statusCode;
+
+ /**
+ * Gets and sets the reason phrase. If no reason phrase is explicitly
+ * set a default reason phrase is provided.
+ */
+ String reasonPhrase;
/**
* Sets a header on the response. NOTE: If the same header name is
@@ -264,14 +275,12 @@ interface HttpClientRequest default _HttpClientRequest {
* the request is not known in advance set content length to -1,
* which is also the default.
*/
- void set contentLength(int contentLength);
- int get contentLength();
+ int contentLength;
/**
* Gets and sets the keep alive state of the connection.
*/
- void set keepAlive(bool keepAlive);
- bool get keepAlive();
+ bool keepAlive;
/**
* Sets a header on the request. NOTE: If the same header name is
« 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