1

我有这样的操作描述:

    "AddContact": {
        "httpMethod": "POST",
        "uri": "icp/a/{account_id}/c/{folder_id}/contacts",
        "summary": "Adds a contact.",
        "responseClass": "IM\\MailingList\\IContact\\Response\\Contact",
        "parameters": {
            "account_id": {
                "location": "uri",
                "required": true
            },
            "folder_id": {
                "location": "uri",
                "required": true
            },
            "contacts": {
                "location": "json",
                "required": true
            }
        }
    }

这是 guzzle 发送的内容:

{"contacts":[{"email":"email@test.tld","firstName":"firstName","lastName":"lastName"}]}

我真正需要的:

[{"email":"email@test.tld","firstName":"firstName","lastName":"lastName"}]

怎么做?

4

1 回答 1

0

我唯一需要做的就是将location参数更改为body.

于 2013-07-09T06:56:29.560 回答