如何在React-native中正确设置axios超时设置

时间:2019-11-17 03:35:47

标签: react-native axios

我在React-native中使用axios,如何设置超时时间?

axios.create(
    baseURL: 'https://dd.com/',
    timeout: 1000,
    headers: {
      'Content-Type': 'application/json',
    }
  })

我做对了吗?因为不正确。

0 个答案:

没有答案