How to configure axios so that the return value can get data? directly

default request API to obtain the returned result of response

clipboard.png

this requires an additional layer of data:response.data.data, when reading data. Is there a configuration item that allows response to return data, directly without having to get it through response.data?

Mar.04,2021

learn about the axios interceptor.

axios.interceptors.response.use(res => {
  console.log(':', res.config.url, res)
  return res.data
})
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1ead2dd-2137.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1ead2dd-2137.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?