java - 添加标题时的改造错误
问题描述
我想在改造中添加标题。
@Headers({"Accept: text/event-stream"})
@GET("condition.json")
Call<String> getCondition();
但我总是收到这个错误。
Exception in thread "main" java.lang.IllegalArgumentException: Unexpected char 0x20 at 6 in header name: Accept
有什么建议吗?提前致谢
解决方案
推荐阅读
- node.js - 如何让我的机器人在 Discord 频道 Discord.js 上设置慢速模式
- javascript - WordPress 和 PHP 中的 JavaScript 内部
- r - 在 R 中优化具有多个参数的自定义函数
- php - 即使站点不存在,我也总是收到 301 HTTP 标头代码(PHP)
- javascript - 如何使用 window.print() 函数仅打印 Iframe 之外的 DOM 内容
- reactjs - React 在通过 props 时的行为与其他 props 命名相同
- foreach - forEach() 使用 ASYNC AWAIT 迭代太快 - 跳过数据
- javascript - AngularFire2/Rxjs 使用 rxjs 进行“嵌套订阅”的正确方法?
- r - 写一个请求以获得报价
- python - 安装在 Google Colab 中的 Google Drive 中的相对路径