mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-03-12 00:45:14 +00:00
Update http.js
This commit is contained in:
parent
a7613eed6a
commit
ed63417c06
|
@ -270,8 +270,8 @@ var HTTPObject = function(engine) {
|
|||
this.serialize = function() {
|
||||
if (this.isJSONRequest() && typeof(this.requestBody) === "object") {
|
||||
return JSON.stringify(this.requestBody);
|
||||
} else if (typeof(requestBody) === "object") {
|
||||
return this.serializeURL(this.requestBody);
|
||||
} else if (typeof(this.requestBody) === "object") {
|
||||
return this.serializeURL(this.evaluate(this.requestBody));
|
||||
} else {
|
||||
return this.evaluate(this.requestBody);
|
||||
}
|
||||
|
@ -370,7 +370,7 @@ var HTTPObject = function(engine) {
|
|||
break;
|
||||
|
||||
default:
|
||||
this.interface.send(this.serialize(this.requestBody));
|
||||
this.interface.send(this.serialize());
|
||||
}
|
||||
|
||||
// Waiting a response
|
||||
|
@ -436,7 +436,7 @@ var HTTPObject = function(engine) {
|
|||
// Add the request body if this is not GET method
|
||||
if (this.method !== "GET") {
|
||||
cmd.push("-d");
|
||||
cmd.push(this.requestBody);
|
||||
cmd.push(this.serialize());
|
||||
}
|
||||
|
||||
// Add proxy: <[protocol://][user:password@]proxyhost[:port]>
|
||||
|
|
Loading…
Reference in New Issue
Block a user