From 9b625260df709c69d49298f29ca46fafa98397e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?brian=20garci=CC=81a?= Date: Sat, 1 Dec 2018 21:11:15 +0100 Subject: [PATCH] return the HTTPClient to allow abort the call --- reste.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/reste.js b/reste.js index 0636f1d..eeb644a 100644 --- a/reste.js +++ b/reste.js @@ -158,7 +158,7 @@ var main = function() { function retry() { log('Retrying...'); - makeHttpRequest(args, onLoad, onError); + return makeHttpRequest(args, onLoad, onError); } var error; @@ -226,7 +226,7 @@ var main = function() { } else { send(); } - + return http; } // set Requestheaders @@ -338,7 +338,7 @@ var main = function() { } }); - makeHttpRequest({ + return makeHttpRequest({ url : url, method : method, params : body, @@ -370,7 +370,7 @@ var main = function() { throw 'RESTe :: missing parameter/s ' + missing + ' for method ' + args.name; } else { - makeHttpRequest({ + return makeHttpRequest({ url : url, method : method, params : body,