我正在开发一个谷歌驱动器项目,但我无法使用 Axios 将搜索参数从前端 React 发送到谷歌 API
可以向我解释一下如何编写像 google Drive api url 这样的查询吗
axios 请求看起来像这样
axios.get('https://www.googleapis.com/drive/v3/files?access_token='+accessToken+'&q=mimeType%3D%22application%2Fvnd.google-apps.folder%22').then(res=>{
console.log(res)
setFolders(res.data.files)
}).then(err=>{
console.log(err)
})
Run Code Online (Sandbox Code Playgroud)
提前致谢 :)