HTTP post, more control needed

Hi, basically everything is going well. Reading from serial is good and I have got this going up to a web server.
However I really need to be able to define what is sent and the names for the variables as this needs to go to a 3rd party site.
I see that you are planning to do more with the vimps and allow us to write our own eventually but would it be possible for us to see the sources for these so that we can just add them, slightly modified to our own code?
Keep up the good work

Hey Peter,
At this point, HTTP is handled internally by our server-it’s not squirrel code that could be tweaked. For now, we recommend putting a little PHP shim script up somewhere that can translate from our API to yours.

Thanks for the quick reply Epall.
I see what you are saying but it is not ideal especially for the likely traffic volumes and the added complication.
Are you going to be creating a more flexible http vimp?
I am going have to remember how php works!

Yes, we’re going to have dramatically more flexibility around HTTP requests coming soon. Hang tight!


When do you expect to add additional features to http requests? Couple weeks, months…longer? Are you going to add the ability to send “GET” requests to the planner?



Likely around a month. You’ll have squirrel code that runs server-side that can access an HTTP API. Yes, you’ll be able to do GETs, as well as synchronously service requests.

I realize that there is new info coming, I am looking for the current docs that explains the http api. If there is just the one in the wiki, then could someone show me and example in their code showing an out bound connection to an external server.



Brad, have been in your position waiting like an expectant father for imps to arrive and trying to work stuff out online. There are some videos around of how folk have built projects. But attached are few screen shots that will hopefully help. Ignore the error msg on my planner I’ve got un-singed SSL cert on my web server.

Basic steps
Define output port
Build http data
Call set method on output port
Link imp to http request vimp
Configure http request vimp


ok, now I have sent out the request to the external web server. How can I read what the response was that the web server gave? I am sending out to the external server the hardware ID of the impee and the web server is going to reply with a assigned userid.



local http_msg = _HOMEURL+“register.php?imp_id=”+_hwd_id;

so is it simply

recieved_data = _dsOut.set(http_msg);



Brad, it’s fire and forget noting back from your host is passed back to your imp. In your php you could send a response back via ‘HTTP in’ vimp using a GET/POST and that can be a number or a string.

The current functionality might feel limited but I’ve used PHP to log imp data to a DB and send real time alerts and control imp via HTML5 + Ajax via HTTP in.