apigee / IgniteEngine-iOS

A platform for rapidly building native mobile applications using declarative JSON.
https://ignite.apigee.com
Other
21 stars 14 forks source link

HTTP Body not sent if formatted as an array #144

Open jeremyanticouni opened 9 years ago

jeremyanticouni commented 9 years ago

When posting a body in a HTTP datasource, if the body is an array (required for Glympse) no data is sent.

Sample posts: http://requestb.in/15bkwwl1?inspect

Datasource:

{
  "_id": "glympse3",
  "_type": "HTTP",
  "actions": [
    {
      "_type": "Alert",
      "attributes": {
        "title": "glympse1",
        "message": "[[$self.response.body.response]]"
      },
      "enabled": true,
      "on": "success"
    },
    {
      "_type": "Refresh",
      "attributes": {
        "_target": "textD1ishwasher"
      },
      "on": "success"
    }
  ],
  "attributes": {
    "cache.enabled": false,
    "autoLoad.enabled": false,
    "method": "POST",
    "responseType": "json",
    "url": "https://verizonventures-prod.apigee.net/glympse/v2/tickets/[[glympse2.response.body.response.id]]/append_data?vzvkey=XA2AV4kUZubjtZ4K9ILMoOhei4FZxR7K&oauth_token=[[glympse1.response.body.response.access_token]]",
    "1debug.requestBinUrl": "http://requestb.in/15bkwwl1",
    "requestType": "json",
    "body": [
      {
        "t": 1420581309673,
        "pid": 0,
        "n": "destination",
        "v": {
          "name": "Starbucks",
          "lat": 47.5773,
          "lng": -122.207
        }
      }
    ]
  }
}
brandonscript commented 9 years ago

This is going to be a complex implementation - deferring to 0.2.0. Current workaround would be to set it as an escaped string instead.