From 335dd9863185c6d9fa1927c605d01e67d2b89136 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 23 May 2019 13:25:20 -0600 Subject: [PATCH] v1.3.11: pass callback --- index.js | 4 ++-- package.json | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index d16ee40..8730e4b 100644 --- a/index.js +++ b/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; diff --git a/package.json b/package.json index 9f16142..da1b4c0 100644 --- a/package.json +++ b/package.json @@ -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": [