Add utility methods for sending non-form data in pkg/http.

R=rnystrom@google.com
BUG=8380

Review URL: https://codereview.chromium.org//65583004

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@30183 260f80e4-7a28-3924-810f-c04153c831b5
diff --git a/lib/src/authorization_code_grant.dart b/lib/src/authorization_code_grant.dart
index 266812e..c879e8c 100644
--- a/lib/src/authorization_code_grant.dart
+++ b/lib/src/authorization_code_grant.dart
@@ -228,7 +228,7 @@
   /// the state beforehand.
   Future<Client> _handleAuthorizationCode(String authorizationCode) {
     var startTime = new DateTime.now();
-    return _httpClient.post(this.tokenEndpoint, fields: {
+    return _httpClient.post(this.tokenEndpoint, body: {
       "grant_type": "authorization_code",
       "code": authorizationCode,
       "redirect_uri": this._redirectEndpoint.toString(),
diff --git a/lib/src/credentials.dart b/lib/src/credentials.dart
index 13d3320..ce4e064 100644
--- a/lib/src/credentials.dart
+++ b/lib/src/credentials.dart
@@ -173,7 +173,7 @@
       };
       if (!scopes.isEmpty) fields["scope"] = scopes.join(' ');
 
-      return httpClient.post(tokenEndpoint, fields: fields);
+      return httpClient.post(tokenEndpoint, body: fields);
     }).then((response) {
       return handleAccessTokenResponse(
           response, tokenEndpoint, startTime, scopes);