v1.3.11: pass callback

Este commit está contenido en:
AJ ONeal 2019-05-23 13:25:20 -06:00
padre 28f3f783ae
commit 335dd98631
Se han modificado 2 ficheros con 3 adiciones y 3 borrados

Ver fichero

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

Ver fichero

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