Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Update XhrIo and XhrManager to allow ArrayBuffer type as content. Thi…

…s is a supported feature of Xhr2 which this cl exposes.

R=brenneman
DELTA=7  (1 added, 0 deleted, 6 changed)


Revision created by MOE tool push_codebase.
MOE_MIGRATION=5791


git-svn-id: http://closure-library.googlecode.com/svn/trunk@2288 0b95b8e8-c90f-11de-9d4f-f947ee5921c8
  • Loading branch information...
commit a29d653adf9357cb13e93c319a908d0a900409d8 1 parent 67d8653
peyman@google.com authored
Showing with 7 additions and 6 deletions.
  1. +2 −2 closure/goog/net/xhrio.js
  2. +5 −4 closure/goog/net/xhrmanager.js
View
4 closure/goog/net/xhrio.js
@@ -149,7 +149,7 @@ goog.net.XhrIo.sendInstances_ = [];
* @param {Function=} opt_callback Callback function for when request is
* complete.
* @param {string=} opt_method Send method, default: GET.
- * @param {string|FormData|GearsBlob=} opt_content
+ * @param {ArrayBuffer|Blob|Document|FormData|GearsBlob|string=} opt_content
* Post data. This can be a Gears blob if the underlying HTTP request object
* is a Gears HTTP request.
* @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
@@ -441,7 +441,7 @@ goog.net.XhrIo.prototype.getWithCredentials = function() {
* Instance send that actually uses XMLHttpRequest to make a server call.
* @param {string|goog.Uri} url Uri to make request to.
* @param {string=} opt_method Send method, default: GET.
- * @param {string|FormData|GearsBlob=} opt_content
+ * @param {ArrayBuffer|Blob|Document|FormData|GearsBlob|string=} opt_content
* Post data. This can be a Gears blob if the underlying HTTP request object
* is a Gears HTTP request.
* @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
View
9 closure/goog/net/xhrmanager.js
@@ -169,7 +169,7 @@ goog.net.XhrManager.prototype.getOutstandingRequestIds = function() {
* @param {string} id The id of the request.
* @param {string} url Uri to make the request too.
* @param {string=} opt_method Send method, default: GET.
- * @param {string=} opt_content Post data.
+ * @param {ArrayBuffer|Blob|Document|FormData|string=} opt_content Post data.
* @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
* request.
* @param {*=} opt_priority The priority of the request. A smaller value means a
@@ -544,7 +544,7 @@ goog.net.XhrManager.Event.prototype.disposeInternal = function() {
* @param {Function} xhrEventCallback Callback attached to the events of the
* XhrIo object of the request.
* @param {string=} opt_method Send method, default: GET.
- * @param {string=} opt_content Post data.
+ * @param {ArrayBuffer|Blob|Document|FormData|string=} opt_content Post data.
* @param {Object|goog.structs.Map=} opt_headers Map of headers to add to the
* request.
* @param {Function=} opt_callback Callback function for when request is
@@ -577,7 +577,7 @@ goog.net.XhrManager.Request = function(url, xhrEventCallback, opt_method,
/**
* Post data.
- * @type {string|undefined}
+ * @type {ArrayBuffer|Blob|Document|FormData|string|undefined}
* @private
*/
this.content_ = opt_content;
@@ -668,7 +668,8 @@ goog.net.XhrManager.Request.prototype.getMethod = function() {
/**
* Gets the post data.
- * @return {string|undefined} The post data.
+ * @return {ArrayBuffer|Blob|Document|FormData|string|undefined}
+ * The post data.
*/
goog.net.XhrManager.Request.prototype.getContent = function() {
return this.content_;
Please sign in to comment.
Something went wrong with that request. Please try again.