Question
Axios 1.5.0 Alters Default Timeout, Impacting Large Dataset Pagination
Ash Moss
0 reputation · 18 Jun 2020, 00:23 UTC
136K views0
Goal
We want to bound a query and paginate a dataset that exceeds Axios’s default limits.
Constraints
Axios 1.5.0 sets timeout to 0, maxRedirects to 5, and changes validateStatus behavior. The transformResponse array now runs in order, allowing header extraction. Streaming responses require manual piping.
Unresolved Questions
- Should we explicitly set maxRedirects to 0 when using pagination links that are delivered via 302 redirects, or rely on the default 5 and filter them?
- What is the recommended pattern for handling responseType:'stream' when paginating large files to avoid backpressure stalls?
- Can we combine a custom validateStatus that accepts 429 and 302 with a transformResponse that captures pagination headers while maintaining the new default timeout?