mirror of
https://github.com/gnh1201/welsonjs.git
synced 2025-05-14 21:51:04 +00:00
Update http.js
This commit is contained in:
parent
31b9e053cd
commit
98513f80e2
|
@ -216,6 +216,14 @@ exports.create = function() {
|
||||||
return (new HTTPObject());
|
return (new HTTPObject());
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.post = function(url, data, headers) {
|
||||||
|
return (new HTTPObject()).setHeaders(headers).setRequestBody(data).post(url).responseBody;
|
||||||
|
}
|
||||||
|
|
||||||
|
exports.get = function(url, data, headers) {
|
||||||
|
return (new HTTPObject()).setHeaders(headers).setRequestBody(data).get(url).responseBody;
|
||||||
|
}
|
||||||
|
|
||||||
exports.VERSIONINFO = "HTTP Lib (http.js) version 0.2";
|
exports.VERSIONINFO = "HTTP Lib (http.js) version 0.2";
|
||||||
exports.global = global;
|
exports.global = global;
|
||||||
exports.require = global.require;
|
exports.require = global.require;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user