2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-11 18:02:32 +03:00

docs(adapters/http)

This commit is contained in:
Jay
2022-06-02 20:57:16 +02:00
parent 8a92772d16
commit 5db829d118
+11
View File
@@ -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<string, any>} options - The options object that was passed to the request.
*
* @returns {Object<string, any>}
*/
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;