When I'm making a post request with axios from client-side(React JS) to the server(spring), the response time of server is more than 2 minutes. So client is not waiting to receive the response when it takes more tan 2 minutes. So I tried to override the default timeout with the below code snippet. But it is not working.Kindly help me to resolve the issue.
const httpClient = Axios.create();
httpClient.defaults.timeout = 240000;
return httpClient.post(url, data).then(
res => res
).catch(err => err);