Jump to content









Photo

POSTing a stream with Arduino

Arduino POST

  • Please log in to reply
3 replies to this topic

#1 dansphd

dansphd

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 21 January 2015 - 01:14 PM

Hi, I am using an Arduino Uno R3, and for now I just want to test sending streams to Carriots.

 

After uploading the example in the library (CarriotsClients) using ethernet, it worked fine. Now I try the same with WiFi but the streams aren't showing on my dashboard as they once were. I am not receiving a response from the Carriots server but it is connecting. This is the request I send:

 

POST /streams/ HTTP/1.1
Host: api.carriots.com
Accept: application/json
User-Agent: Arduino_simple1@dansphd.dansphd
Content-Type: application/json
carriots.apikey: [MYAPIKEY]
Content-Length: 133
Connection: close

{"protocol":"v1","checksum":"","device":"Arduino_simple1@dansphd.dansphd","at":"now","data":{"Name":"James","Age":"28","Gender":"M"}}
 
This should be simple stuff! What am I missing?


#2 eric3231559

eric3231559

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

Posted 22 January 2015 - 06:22 AM

Hi there, may i know are you using wizfi shield ? 



#3 dansphd

dansphd

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 22 January 2015 - 09:47 AM

Hi, I am using the official Arduino WiFi shield with integrated antenna.



#4 eric3231559

eric3231559

    Advanced Member

  • Members
  • PipPipPip
  • 44 posts

Posted 02 February 2015 - 07:08 AM

Hi there, I hope this helps .

 

I am using wizfi shield instead of the ethernet too.

I change a bit on the request. I notice that the problem is the content length. Still figuring why it causing the problem.

 

http://forum.carriot...h-arduino-mega/







Also tagged with one or more of these keywords: Arduino, POST

3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users