From 5db829d118dfb92ad18301f59b0c2cf172d9070d Mon Sep 17 00:00:00 2001 From: Jay Date: Thu, 2 Jun 2022 20:57:16 +0200 Subject: [PATCH] docs(adapters/http) --- lib/adapters/http.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/lib/adapters/http.js b/lib/adapters/http.js index fc87251..cafcc50 100755 --- a/lib/adapters/http.js +++ b/lib/adapters/http.js @@ -25,6 +25,14 @@ var supportedProtocols = platform.protocols.map(function(protocol) { return protocol + ':'; }); +/** + * If the proxy or config beforeRedirects functions are defined, call them with the options + * object. + * + * @param {Object} options - The options object that was passed to the request. + * + * @returns {Object} + */ function dispatchBeforeRedirect(options) { if (options.beforeRedirects.proxy) { options.beforeRedirects.proxy(options); @@ -35,10 +43,13 @@ function dispatchBeforeRedirect(options) { } /** + * If the proxy or config afterRedirects functions are defined, call them with the options * * @param {http.ClientRequestArgs} options * @param {AxiosProxyConfig} configProxy * @param {string} location + * + * @returns {http.ClientRequestArgs} */ function setProxy(options, configProxy, location) { var proxy = configProxy;