aboutsummaryrefslogtreecommitdiff
path: root/pollymer.js
diff options
context:
space:
mode:
Diffstat (limited to 'pollymer.js')
-rw-r--r--pollymer.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/pollymer.js b/pollymer.js
index dd5da75..05d3189 100644
--- a/pollymer.js
+++ b/pollymer.js
@@ -1,5 +1,5 @@
/**
- * Pollymer JavaScript Library v1.1.1
+ * Pollymer JavaScript Library v1.1.2
* Copyright 2013-2014 Fanout, Inc.
* Released under the MIT license (see COPYING file in source distribution)
*/
@@ -228,6 +228,8 @@
this.timeout = 60000;
this.errorCodes = '500-599';
+ this.lastRequest = null;
+
if (arguments.length > 0) {
var config = arguments[0];
if ("transport" in config) {
@@ -308,6 +310,7 @@
};
Request.prototype._initiate = function (delayMsecs) {
var self = this;
+ self.lastRequest = null;
self._timer = window.setTimeout(function () { self._startConnect(); }, delayMsecs);
};
Request.prototype._startConnect = function () {
@@ -326,6 +329,14 @@
// cleanup would be a no-no)
this._transport = chooseTransport(this.transport, url);
+ self.lastRequest = {
+ method: method,
+ uri: url,
+ headers: headers,
+ body: body,
+ transport: this._transport
+ };
+
switch (this._transport) {
case transportTypes.Xhr:
consoleInfo("pollymer: Using XHR transport.");