2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-14 18:42:33 +03:00

Adding support for beforeRedirect config option (#3852)

* Adding support for beforeRedirect config option

* Adding tests for beforeRedirect

* Update README.md

Co-authored-by: Prabodh Meshram <prabodh.meshram7@gmail.com>

* fix types

Co-authored-by: Prabodh Meshram <prabodh.meshram7@gmail.com>
Co-authored-by: Jay <jasonsaayman@gmail.com>
This commit is contained in:
Zoran Kokeza
2022-03-07 18:46:08 +01:00
committed by GitHub
parent 3d13b67c56
commit 412d3bd607
5 changed files with 38 additions and 3 deletions
Vendored
+1 -1
View File
@@ -1,5 +1,4 @@
// TypeScript Version: 3.0
export type AxiosRequestHeaders = Record<string, string | number | boolean>;
export type AxiosResponseHeaders = Record<string, string> & {
@@ -98,6 +97,7 @@ export interface AxiosRequestConfig<D = any> {
validateStatus?: ((status: number) => boolean) | null;
maxBodyLength?: number;
maxRedirects?: number;
beforeRedirect?: (options: Record<string, any>, responseDetails: {headers: Record<string, string>}) => void;
socketPath?: string | null;
httpAgent?: any;
httpsAgent?: any;