v1.3.11: pass callback
This commit is contained in:
parent
28f3f783ae
commit
335dd98631
4
index.js
4
index.js
|
@ -391,12 +391,12 @@ function setDefaults(defs) {
|
|||
return setDefaults(_defs);
|
||||
};
|
||||
[ 'get', 'put', 'post', 'patch', 'delete', 'head', 'options' ].forEach(function (method) {
|
||||
urequest[method] = function (obj) {
|
||||
urequest[method] = function (obj, cb) {
|
||||
if ('string' === typeof obj) {
|
||||
obj = { url: obj };
|
||||
}
|
||||
obj.method = method.toUpperCase();
|
||||
urequest(obj);
|
||||
urequest(obj, cb);
|
||||
};
|
||||
});
|
||||
urequest.del = urequest.delete;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@root/request",
|
||||
"version": "1.3.10",
|
||||
"version": "1.3.11",
|
||||
"description": "A lightweight, zero-dependency drop-in replacement for request",
|
||||
"main": "index.js",
|
||||
"files": [
|
||||
|
|
Loading…
Reference in New Issue