axios
axios copied to clipboard
Get Retry-After from response headers
Describe the issue
In my API error data I receive 429 status and Retry-After key in the Response Header content. But in object of response I can't see response header.
Example Code
axios.post('http://example.com/api/v1/login-requests', req)
.then(({ data: { data } }) => data)
.catch((error) => {
console.log('error', error);
return error;
}));
Expected behavior
HTTP/1.1 429 Too Many Requests Server: nginx/1.10.3 (Ubuntu) Date: Sun, 16 Oct 2022 09:05:36 GMT Content-Length: 0 Connection: keep-alive Access-Control-Allow-Credentials: true Access-Control-Allow-Origin: http://localhost:3000 Retry-After: 2 Vary: Origin
Axios Version
1.1.3
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