diff --git a/lib/http.js b/lib/http.js index 5a7c5e5..7e903be 100644 --- a/lib/http.js +++ b/lib/http.js @@ -21,7 +21,7 @@ var HTTPObject = function(engine) { this.parameters = {}; this.dataType = null; this.userAgent = "WelsonJS/0.2.4-dev (" + OS_NAME + "; " + OS_ARCH + "; " + DEVICE_UUID + "; https://github.com/gnh1201/welsonjs)"; - this.isAsync = false; + this.isAsynchronous = false; this.proxy = { "enabled": false, "protocol": "http", @@ -102,7 +102,7 @@ var HTTPObject = function(engine) { data: this.requestBody, contentType: this.contentType, success: callback, - async: this.isAsync, + async: this.isAsynchronous, error: onError // (request, status, error) }); }; @@ -278,8 +278,8 @@ var HTTPObject = function(engine) { return this; }; - this.setUseAsync = function(flag) { - this.isAsync = flag; + this.setIsAsynchronous = function(flag) { + this.isAsynchronous = flag; return this; } @@ -352,11 +352,11 @@ var HTTPObject = function(engine) { // Open switch (this.method) { case "POST": - this.interface.open(method, url, this.isAsync); + this.interface.open(method, url, this.isAsynchronous); break; case "GET": - this.interface.open(method, url, this.isAsync); + this.interface.open(method, url, this.isAsynchronous); break; default: