Http.get(...).sendsync().statuscode returning 52 (CURLE_GOT_NOTHING)

I’m trying to setup some http calls to our platform and I have it working with POST requests, but when I try to setup the GET requests I get a curl error code and I don’t know what I need to fix.

I’m getting response.statuscode == 52 which is: CURLE_GOT_NOTHING. Is this something that I’m doing wrong or could it be a bug on the server side? I’m pretty sure it’s not a problem with our HTTP interface since I’m using our production server and I have several other devices sitting on my desk that are working just fine.

Here’s my full test code and log: https://gist.github.com/Azdle/5750587

In the Agent Code the relevant parts are the read function and the device.on(“read”,…) call. The device code is stripped down to only the relevant stuff.

i am still learning arrays and tables, but I have my doubts about this line:
agent.send("read", ["data"]);

Ah ha! You put me on the right track. The issue was with code that was generating the URL. I used ARRAY.tostring() method when I was testing hoping that it would return a string of all the items in the array but it was just (table : pointer) and that was what was causing the error. Removing that, I now get HTTP errors from my server.

EDIT: I updated the code in the GIST for anyone else that has this problem, take a look at revision 3 -> revision 4 to see what I fixed.

Thanks for the help.