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

Side by Side Diff: tools/dom/templates/html/impl/impl_XMLHttpRequest.darttemplate

Issue 25027005: Adjust HTTP Request docs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 2 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of $LIBRARYNAME; 5 part of $LIBRARYNAME;
6 6
7 /** 7 /**
8 * A utility for retrieving data from a URL. 8 * A utility for retrieving data from a URL.
9 * 9 *
10 * HttpRequest can be used to obtain data from http, ftp, and file 10 * HttpRequest can be used to obtain data from http, ftp, and file
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 requestHeaders.putIfAbsent('Content-Type', 80 requestHeaders.putIfAbsent('Content-Type',
81 () => 'application/x-www-form-urlencoded; charset=UTF-8'); 81 () => 'application/x-www-form-urlencoded; charset=UTF-8');
82 82
83 return request(url, method: 'POST', withCredentials: withCredentials, 83 return request(url, method: 'POST', withCredentials: withCredentials,
84 responseType: responseType, 84 responseType: responseType,
85 requestHeaders: requestHeaders, sendData: formData, 85 requestHeaders: requestHeaders, sendData: formData,
86 onProgress: onProgress); 86 onProgress: onProgress);
87 } 87 }
88 88
89 /** 89 /**
90 * Creates a URL request for the specified [url]. 90 * Creates and sends a URL request for the specified [url].
91 * 91 *
92 * By default `request` will perform an HTTP GET request, but a different 92 * By default `request` will perform an HTTP GET request, but a different
93 * method (`POST`, `PUT`, `DELETE`, etc) can be used by specifying the 93 * method (`POST`, `PUT`, `DELETE`, etc) can be used by specifying the
94 * [method] parameter. 94 * [method] parameter.
95 * 95 *
96 * The Future is completed when the response is available. 96 * The Future is completed when the response is available.
97 * 97 *
98 * If specified, `sendData` will send data in the form of a [ByteBuffer], 98 * If specified, `sendData` will send data in the form of a [ByteBuffer],
99 * [Blob], [Document], [String], or [FormData] along with the HttpRequest. 99 * [Blob], [Document], [String], or [FormData] along with the HttpRequest.
100 * 100 *
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 } else { 267 } else {
268 JS('', '#.send()', xhr); 268 JS('', '#.send()', xhr);
269 } 269 }
270 270
271 return completer.future; 271 return completer.future;
272 $endif 272 $endif
273 } 273 }
274 274
275 $!MEMBERS 275 $!MEMBERS
276 } 276 }
OLDNEW
« no previous file with comments | « sdk/lib/html/dartium/html_dartium.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698