Answers for "How can I get the status code from an http error in Axios?"

0

How can I get the status code from an http error in Axios?

axios.get('/foo')
  .catch(function (error) {
    if (error.response) {
      console.log(error.response.data);
      console.log(error.response.status);
      console.log(error.response.headers);
    }
  });
Posted by: Guest on July-05-2021

Code answers related to "How can I get the status code from an http error in Axios?"

Code answers related to "ActionScript"

Browse Popular Code Answers by Language