【问题标题】:response not viewable in response body in rest client在休息客户端的响应正文中看不到响应
【发布时间】:2016-03-13 01:21:41
【问题描述】:

我正在开发rest web服务项目,目前实际上在mozilla的rest客户端(chrome://restclient/content/restclient.html)它将获取{“id”:“1234”}作为请求json并获取id 的详细信息,并从数据库中提供 id 的所有详细信息并转换为 json 数组,最后存储在 responsetoservice 对象中。

当我点击服务 URL 时,请求到达服务器并且状态为 200 OK。但是 json 中的响应正文在 Rest 客户端的响应正文(Raw)中不可见。但是当我查看日志时,会打印 json 响应。

任何人都可以帮助我解决这个问题。请帮助我了解为什么在休息客户端 int mozilla 中无法查看响应 json

【问题讨论】:

  • 更多细节,例如需要源代码示例
  • 复制粘贴你的url到firefox中,然后在处理请求时右键选择查看源,如果你能找到你的回复。
  • 嗨 vinay,我正在运行这个 chrome://restclient/content/restclient.html 中的 url
  • 嗨亚历山大·埃尔金,responseToService = "{\"details\":" + responseFrmDB .getJSONArray(constants.id_DETAILS_DB) .toString() + "}";这是 json 数组的转换,当我运行 restclient chrome://restclient/content/restclient.html 并给我的 url 方法是 post 并且请求是单个 json {"id":"1234"} 请求到达服务器状态为 200 ok,我的 json 响应打印在日志上。但我无法在 restclient ui 响应正文上查看响应,你能帮忙吗

标签: json rest service request response


【解决方案1】:

问题可能是您的浏览器无法解析和显示响应,请查看https://weblog.west-wind.com/posts/2011/Apr/01/Displaying-JSON-in-your-Browser

【讨论】:

  • 除了 mozilla 和 chrome 之外,还有其他方式来做 restclient 吗?
猜你喜欢
  • 1970-01-01
  • 2021-08-17
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2011-05-27
相关资源
最近更新 更多