Last active
December 28, 2015 06:09
Revisions
-
iskugor revised this gist
Nov 25, 2013 . 1 changed file with 43 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,45 @@ function XMLHttpRequest() { this._client = Ti.Network.createHTTPClient({ autoEncodeUrl: false, timeout: 5000 }); var _this = this; this._client.onreadystatechange = function() { _this._onreadystatechange(); }; this._client.onerror = function() { _this.onerror(); }; }; XMLHttpRequest.prototype = { open: function(method, url, async) { this._client.open(method, url, async); }, setRequestHeader: function(key, value) { this._client.setRequestHeader(key, value); }, send: function(data) { this._client.send(data); }, _onreadystatechange: function() { if (this.onreadystatechange) { this.readyState = this._client.readyState; this.status = this._client.status; this.responseText = this._client.responseText; this.onreadystatechange(); } }, onerror: function() { if (this.onreadystatechange) { this.readyState = this._client.DONE; this.status = this._client.status; this.responseText = this._client.responseText; this.onreadystatechange(); } } } exports.XMLHttpRequest = XMLHttpRequest; -
iskugor created this gist
Nov 13, 2013 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ module.exports = { getItem : function(_key) { return Ti.App.Properties.getObject(_key); }, setItem : function(_key, _value) { return Ti.App.Properties.setObject(_key, _value); }, removeItem : function(_key, _value) { return Ti.App.Properties.removeProperty(_key); } }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,2 @@ var Parse = require("parse").Parse; Parse.initialize(app_id, javascript_key); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ exports.XMLHttpRequest = function() { return Ti.Network.createHTTPClient({ autoEncodeUrl: false, timeout : 5000 }); };