2013-07-09 48 views
1

我有這樣的操作說明:如何讓guzzle發送參數而不用它的名字?

"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 
      } 
     } 
    } 

這裏是狂飲發送:

{"contacts":[{"email":"[email protected]","firstName":"firstName","lastName":"lastName"}]} 

我真的需要:

[{"email":"[email protected]","firstName":"firstName","lastName":"lastName"}] 

怎麼辦呢?

回答

0

我唯一需要做的就是將參數location更改爲body

相關問題