Update http.js

This commit is contained in:
Namhyeon Go 2022-06-09 12:03:23 +09:00 committed by GitHub
parent ff00f3cf5b
commit 548929f2ce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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: