我有一个名为的方法 getInfo ,我曾经向API请求使用 POST 方法我的问题是,我也想得到图像加载的百分比。我正在使用 axios 而且
getInfo
POST
axios
export const getInfo = () => async (dispatch) => { try { dispatch({ type: constants.requesting, }); const response = await axios.post(`https://test.com`, null); console.log(response); dispatch({ type: constants.success, }); } catch (error) { console.log(error); dispatch({ type: constants.error, }); } };