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

微信支付沙箱测试错误

接口: 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,页面也不会发生跳转。

    评论

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突