qq_33726141 2018-03-31 08:35 采纳率: 0%
浏览 2862
已结题

微信支付沙箱测试错误

接口: https://apitest.mch.weixin.qq.com/sandboxnew/pay/getsignkey

错误信息(json打印):
{"code":"204","status":"ERROR","responseline":"HTTP\/1.1 204 ERROR","headers":{"Server":"nginx","Date":"Sat, 31 Mar 2018 08:05:42 GMT","Content-Type":"text\/plain;charset=utf-8","Content-Length":"178","Connection":"close","from":"sandbox"},"content":false,"meta":"HTTP\/1.1 204 ERROR\r\nServer: nginx\r\nDate: Sat, 31 Mar 2018 08:05:42 GMT\r\nContent-Type: text\/plain;charset=utf-8\r\nContent-Length: 178\r\nConnection: close\r\nfrom: sandbox\r\n\r\n"}

这是怎样一回事?

  • 写回答

1条回答 默认 最新

  • _1_1_7_ 2018-04-03 02:43
    关注

    状态码204,在HTTP RFC 2616中关于204的描述如下:

    If the client is a user agent, it SHOULD NOT change its document view from that which caused the request to be sent. This response is primarily intended to allow input for actions to take place without causing a change to the user agent’s active document view, although any new or updated metainformation SHOULD be applied to the document currently in the user agent’s active view.
    意思等同于请求执行成功,但是没有数据,浏览器不用刷新页面.也不用导向新的页面。如何理解这段话呢。还是通过例子来说明吧,假设页面上有个form,提交的url为http-204.htm,提交form,正常情况下,页面会跳转到http-204.htm,但是如果http-204.htm的相应的状态码是204,此时页面就不会发生转跳,还是停留在当前页面。另外对于a标签,如果链接的页面响应码为204,页面也不会发生跳转。

    评论

报告相同问题?

悬赏问题

  • ¥20 求一个html代码,有偿
  • ¥100 关于使用MATLAB中copularnd函数的问题
  • ¥20 在虚拟机的pycharm上
  • ¥15 jupyterthemes 设置完毕后没有效果
  • ¥15 matlab图像高斯低通滤波
  • ¥15 针对曲面部件的制孔路径规划,大家有什么思路吗
  • ¥15 钢筋实图交点识别,机器视觉代码
  • ¥15 如何在Linux系统中,但是在window系统上idea里面可以正常运行?(相关搜索:jar包)
  • ¥50 400g qsfp 光模块iphy方案
  • ¥15 两块ADC0804用proteus仿真时,出现异常