submitting JSON objects to Guzzle Services

37 views
Skip to first unread message

Ben Incani

unread,
Dec 19, 2016, 1:04:10 AM12/19/16
to Guzzle - PHP HTTP client and REST client framework
Does Guzzle Services support JSON requests with nested fields?

If yes, then how do I describe a JSON request like this.

{
    "from": {
        "recipient": "foo\@bar.com"
    },
    "to": {
        "recipient": "bar\@foo.com"
    },
    "items": [
        {
            "width": 5,
            "height": 5,
        },
        {
            "width": 1,
            "height": 1,
        }
    ]
}


How should the service.json look?

{
    "operations": {
        "GetItemPrices": {
            "httpMethod": "POST",
            "uri": "shipping/v1/prices/items",
            "summary": "This interface retrieves valid postage products and pricing based upon the merchant location address, destination, and details of the parcel.",
            "parameters": {
                ????


Reply all
Reply to author
Forward
0 new messages