Description
Describe the bug
As of today, Axios seems to be unable to handle requests that result in a "204 No Content" response. Any API request that responds with a 204 status code is treated as a timeout.
Preliminary testing and investigation suggest that the issue might be related to Axios instances.
It might be challenging to provide a publicly accessible test case since finding APIs that reliably respond with a 204 status code could be difficult.
To Reproduce
As of the latest observation, Axios encounters an issue where responses with an empty body (e.g., "204 No Content") are incorrectly treated as timeouts when using an Axios instance.
Notably, when requests are made without creating an Axios instance directly, the behavior is as expected.
Steps to Reproduce:
- Create an Axios instance.
- Make a request using the Axios instance to an API endpoint that returns a response with an empty body (e.g., 204 status code).
- Observe that the Axios instance incorrectly handles the response as a timeout.
Code snippet
No response
Expected behavior
Axios should accurately handle responses with an empty body, such as 204 status codes, without treating them as timeouts.
Axios Version
No response
Adapter Version
No response
Browser
No response
Browser Version
No response
Node.js Version
No response
OS
No response
Additional Library Versions
No response
Additional context/Screenshots
No response
Activity