Not getting expected response from data.sparkfun.com

My hardware: CC3000 with Redboard.

My software: “Pushing Data to data.sparkfun.com” example - unmodified except for entering my network settings. You can see this sketch at https://learn.sparkfun.com/tutorials/pu … 000-shield.

Problem:

After downloading, when I run my serial monitor, I see the expected network connection confirmations. The first data push returns the full header as expected. But on subsequent pushes, the data is pushed correctly but I don’t understand the response from the server. See below.

Here is the output from my serial monitor.

CC3000 Ready!

Connecting to… eyepee

My IP: 192.168.1.228

=========== Ready to Stream ===========

Press the button (D3) to send an update

Type your name, followed by ‘!’ to update name

[button pressed a first time]

Posting!

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=/

a

1 success

0

[button pressed a second time]

Posting!

Connection: close

[button pressed a third time]

Posting!

Connection: close

Can someone help me understand why I’m not getting a response on the second and third data pushes? I’m expecting a “1 success” or '0 error…"? I want to get a response that I can parse for alerting the user to an error.

I still don’t have any idea why this is happening. Is anyone else getting this behavior with the standard shipping example shown on the Sparkfun website? Or am I doing something stupid?

Ok. I figured out what is happening and I thought I’d post the answer for others who might be confused about this same issue.

The response I’m getting is chunked (I didn’t know what “Transfer-Encoding: chunked” meant because http encoding is new to me). The chunked response I’m getting is

a

1 success

0

The “a” means there are 10 characters (“1 success\n”) and the “0” means no more characters.