HTTP POST API - Custom fields

Is there a way to set custom POST fields other than “value”?


I’d like to use Boxcar.io or UrbanAirship to send a push notification when my garage door is left open.

For Boxcar.io I need to set the email & notification[message] fields:
curl -d "email=test@me.com&notification[message]=Message" http://boxcar.io/devices/providers/MH0S7xOFSwVLNvNhTpiC/notifications

Or to use UrbanAirship I’d additionally need to set the username/password and be able to send in a JSON object.

curl -X POST -u “:” \
    -H “Content-Type: application/json” \
    --data ‘{“device_tokens”: [""], “aps”: {“alert”: “Hello!”}}’ \
    https://go.urbanairship.com/api/push/


Separately, is there something special I need to do to enable server.log()? The log under my code window always just says “No device connected”.

Enter the editor through the tools button on the imp icon, then you will see logging. This is an artifact of the old planner UI and will be much better in the next rev.

As for the http: more flexibility is coming!

Thanks Hugo!