3

我遇到了 HTTP 请求问题。我不断收到 400 错误。

我尝试访问的服务需要具有以下格式的 JSON 正文:

{
    "items":[{
        "id":0,
        "modifiers":[],
        "note":"",
        "quantity":0
    }],
    "type":0
}

哪里0可以是任何数字。但是,我的应用程序发送的请求格式如下。

{
    "items":[{
        "id":0,
        "note":"",
        "modifiers":[],
        "quantity":0
    }],
    "type":0
}

这可能是我不断收到的 400 HTTP 请求错误代码的原因吗?

4

1 回答 1

1

这不是错误原因。json key:value 的顺序无关紧要。您可以检查此链接以找出错误原因:

http://www.checkupdown.com/status/E400.html

希望这会帮助你。

于 2013-08-26T02:08:53.377 回答