代码段是
async getInfo(): Promise<any>{
let response;
try{
response = await Axios.get('api/***')
//response.json()
//what is json here?
//Error here is "[ts] Property 'json' does not exist on type 'AxiosResponse<any>'."
}catch(err){
response = err;
console.log(err)
}
return response;
}
,在这里 err 不会打印为json,我如何将其转换为json?它显示像这样
Error: Request failed with status code 403