📜  axios 超时发布示例 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:01.333000             🧑  作者: Mango

代码示例1
//example of an axios post request with body and config object with timeout
//timeout is response (not request) timeout
axios.post('http://mysite.com/user', { name: 'John' }, { timeout: 2 })
  .then(response => {     console.log(response);  })
  .catch(error => {     console.log(error);  });