title: How to setTimeout axios response - reactjs
body: <p>Is it possible to <code>setTimeOut</code> the response of the following <code>axios</code> call?</p>
  
  <pre><code>export function getMetricsByContent(metricsParams) {
      console.log('metricsParams: ', metricsParams);
      return (dispatch) =&gt; {
          return axios.post(`/rbac/aa/reads/getReport`, metricsParams).then((response) =&gt; {
              console.log('metricsApiResponse: ', response);
              if (response.status !== 200) {
                  throw Error(response.statusText);
              }
              return response;
          }).then((response) =&gt; {
              if (response) {
                  return response.data.msg;
              } else {
                  return "No content available";
              }
  
          })
              .catch((err) =&gt; {return err});
          };
  
  }
  </code></pre>