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

Unified Diff: sdk/lib/io/http_impl.dart

Issue 246923003: Add HttpClient:put/delete/head/patch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 8 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 | « sdk/lib/io/http.dart ('k') | tests/standalone/io/http_client_connect_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/io/http_impl.dart
diff --git a/sdk/lib/io/http_impl.dart b/sdk/lib/io/http_impl.dart
index 5d13f54bb62f3b597d1266d7e662f51928747b03..d3325229cc1bcaa3ae32c3f5efe6b43cb0635d12 100644
--- a/sdk/lib/io/http_impl.dart
+++ b/sdk/lib/io/http_impl.dart
@@ -1549,25 +1549,35 @@ class _HttpClient implements HttpClient {
return _openUrl(method, url);
}
- Future<HttpClientRequest> get(String host,
- int port,
- String path) {
- return open("get", host, port, path);
- }
+ Future<HttpClientRequest> get(String host, int port, String path)
+ => open("get", host, port, path);
- Future<HttpClientRequest> getUrl(Uri url) {
- return _openUrl("get", url);
- }
+ Future<HttpClientRequest> getUrl(Uri url) => _openUrl("get", url);
- Future<HttpClientRequest> post(String host,
- int port,
- String path) {
- return open("post", host, port, path);
- }
+ Future<HttpClientRequest> post(String host, int port, String path)
+ => open("post", host, port, path);
- Future<HttpClientRequest> postUrl(Uri url) {
- return _openUrl("post", url);
- }
+ Future<HttpClientRequest> postUrl(Uri url) => _openUrl("post", url);
+
+ Future<HttpClientRequest> put(String host, int port, String path)
+ => open("put", host, port, path);
+
+ Future<HttpClientRequest> putUrl(Uri url) => _openUrl("put", url);
+
+ Future<HttpClientRequest> delete(String host, int port, String path)
+ => open("delete", host, port, path);
+
+ Future<HttpClientRequest> deleteUrl(Uri url) => _openUrl("delete", url);
+
+ Future<HttpClientRequest> head(String host, int port, String path)
+ => open("head", host, port, path);
+
+ Future<HttpClientRequest> headUrl(Uri url) => _openUrl("head", url);
+
+ Future<HttpClientRequest> patch(String host, int port, String path)
+ => open("patch", host, port, path);
+
+ Future<HttpClientRequest> patchUrl(Uri url) => _openUrl("patch", url);
void close({bool force: false}) {
_closing = true;
« no previous file with comments | « sdk/lib/io/http.dart ('k') | tests/standalone/io/http_client_connect_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698