Want to use server response

Everything pertaining to the data.sparkfun.com service, the phant project which powers it, and user projects which talk to the service.

Moderators: phalanx, toddtreece, Brennen@SparkFun

Post Reply
Posts: 4
Joined: Mon May 18, 2015 7:54 pm

Want to use server response

Post by Loswarren » Sun Jun 07, 2015 5:28 am

I'm using the CC3000 and the standard shipping example at https://learn.sparkfun.com/tutorials/pu ... 000-shield. I've modified the sketch for my network and data stream (no other changes).

I want to send the data and then parse the "1 success" or "0 ..." response messages so that I can update an LED for the user to see that logging was successful. When I run the example, I don't get a success/failure response after the first go - even though I can see through the public URL that the data did indeed post correctly after each button press.

Here is an example where I posted data three times (using three button-presses a few seconds apart).

Code: Select all

CC3000 Ready!
Connecting to... eyepee
My IP:
=========== Ready to Stream ===========
Press the button (D3) to send an update
Type your name, followed by '!' to update name
[button pressed a first time]
Connection: close
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: 299
X-Rate-Limit-Reset: 1432006130.059
Date: Tue, 19 May 2015 03:13:50 GMT
Connection: close
Transfer-Encoding: chunked
Set-Cookie: SERVERID=phantworker2; path=/

1 success


[button pressed a second time]
Connection: close

[button pressed a third time]
Connection: close
I'm expecting to get "1 success" back each time after the post was complete but I'm not seeing that. I'm sure this issue is my lack of understanding. Can someone give me a push in the right direction?

Post Reply