mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
docs(adapters/http)
This commit is contained in:
@@ -25,6 +25,14 @@ var supportedProtocols = platform.protocols.map(function(protocol) {
|
|||||||
return 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) {
|
function dispatchBeforeRedirect(options) {
|
||||||
if (options.beforeRedirects.proxy) {
|
if (options.beforeRedirects.proxy) {
|
||||||
options.beforeRedirects.proxy(options);
|
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 {http.ClientRequestArgs} options
|
||||||
* @param {AxiosProxyConfig} configProxy
|
* @param {AxiosProxyConfig} configProxy
|
||||||
* @param {string} location
|
* @param {string} location
|
||||||
|
*
|
||||||
|
* @returns {http.ClientRequestArgs}
|
||||||
*/
|
*/
|
||||||
function setProxy(options, configProxy, location) {
|
function setProxy(options, configProxy, location) {
|
||||||
var proxy = configProxy;
|
var proxy = configProxy;
|
||||||
|
|||||||
Reference in New Issue
Block a user