【发布时间】:2017-07-18 01:23:08
【问题描述】:
我正在尝试从用户的谷歌驱动器下载电子表格。我遇到了 CORS 问题。
阅读:
https://github.com/google/google-api-javascript-client/issues/47
我正在尝试在服务器端发出 GET 请求。我尝试使用 restTemplate.exchange 但我不确定我的回复应该采用什么格式。基本上完全丢失了。
有没有办法让 GET 提取文件并传回我的前端?
无论我尝试什么格式,我都会不断收到此错误:
org.springframework.web.client.RestClientException: 无法提取响应: 没有为响应类型 [interface java.sql.Blob] 和内容类型 [application/vnd.openxmlformats-officedocument.spreadsheetml.sheet] 找到合适的 HttpMessageConverter /p>
非常感谢任何帮助。
【问题讨论】:
标签: java rest google-api google-drive-api