sparkfun / phant

the data logging engine behind data.sparkfun.com
700 stars 98 forks source link

HTTP response with c #138

Closed XenoMehdi closed 6 years ago

XenoMehdi commented 9 years ago

hi, I send a post request using sockets with c language, and I receive the following response, I don't understand why the body contains the character at the beginning and the number 0 at the end ?

Response: HTTP/1.1 200 OK Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET,POST,DELETE Access-Control-Allow-Headers: X-Requested-With, Phant-Private-Key Content-Type: text/plain X-Rate-Limit-Limit: 300 X-Rate-Limit-Remaining: 294 X-Rate-Limit-Reset: 1421181545.44 Date: Tue, 13 Jan 2015 20:36:20 GMT Transfer-Encoding: chunked Set-Cookie: SERVERID=phantworker3; path=/

a 1 success

0

dctsystems commented 9 years ago

This threw me too - I'm not a regular low level http. The clue is "Transfer-encoding: chunked". "a" means theres 10 bytes to follow, which is the success message. Then the 0 means there's 0 bytes no the final line http://en.wikipedia.org/wiki/Chunked_transfer_encoding

bboyho commented 6 years ago

Phant is No Longer in Operation

Unfortunately Phant, our data-streaming service, is no longer in service and will be discontinued. The system has reached capacity and, like a less-adventurous Cassini, has plunged conclusively into a fiery and permanent retirement. There are several other maker-friendly, data-streaming services and/or IoT platforms available as alternatives. The three we recommend are Blynk, ThingSpeak, and Cayenne. You can read our blog post [ https://www.sparkfun.com/news/2413 ] on the topic for an overview and helpful links for each platform.