【发布时间】:2017-08-29 19:30:20
【问题描述】:
当我发出请求时,我会收到 XML 格式的响应,但我需要的是 JSON。在文档中声明是为了获得 JSON 作为回报:使用 Accept: application/json HTTP 标头。
在哪里可以找到将Accept: application/json 放入其中的 HTTP 标头?
我的猜测是它不应该在 URL 请求中,它看起来像:
http://localhost:8080/otp/routers/default/plan?fromPlace=52.5895,13.2836&toPlace=52.5461,13.3588&date=2017/04/04&time=12:00:00
【问题讨论】:
-
你是如何发送请求的?
标签: json rest request-headers