AnsweredAssumed Answered

JSON POST from a Kinetis Micro

Question asked by Tharon Hall on Feb 18, 2015
Latest reply on Feb 20, 2015 by Tharon Hall

I realize that getting the TCP connection up to make this happen may be the largest part of the battle, but is there an easy way to do the equivalent to the following on a Kinetis micro:

 

curl --include \
   --request POST \
   --header "Content-Type: application/json" \
   --header "X-IS-AccessKey: YOUR_KEY" \
   --header "X-IS-BucketKey: curl_example_bucket" \
   --header "Accept-Version: 0.0.1" \
   --data-binary "[
  {
  \"key\": \"tempurature\",
  \"value\": \"22.2\",
  \"epoch\": 1419876021.778477
  },
  {
  \"key\": \"temperature\",
  \"value\": \"23.2\",
  \"epoch\": 1419876031.778477
  },
  {
  \"key\": \"temperature\",
  \"value\": \"22.1\",
  \"epoch\": 1419876061.778477
  }
]"
\
'https://groker.initialstate.com/api/events'


Could a Serial Port Protocol Bluetooth connection to a TCP/IP connected host be a solution? I am looking for a quick and dirty way to do IoT type functionality using a FRDM board and the stuff at InitialState looks appealing if I can get the support going on my end.


Thanks!


Tharon Hall


Outcomes