JimboZA
January 20, 2014, 12:51pm
1
I just read about the HTTP client library in another thread, and got the impression it's a Yun thing.
Is it?- and / or does it work on E'net Wiznet 5100 shields?
I surmise the client.get() sends a GET containing a literal which looks like it would make requests a lot simpler.
EDIT.... found it on github, going to try it later when I get home.
Tried it and it works.... even parses the response.
(For some reason, it doesn't like arduino.cc (err = -3) but goes to google.com and jimbrown.co.za)
So, just for a laff I Googled to see if anyone had implemented an HTCPCP (RFC2324) server...
If you run the SimpleHTTPExample with:
const char kHostname[] = "htcpcp.azurewebsites.net";
const char kPath[] = "/api/v1/htcpcp/1";
... you will find a 418 code
Monitor output:
startedRequest ok
Got status code: 418
Content length is: 12
Body returned follows:
I'm a teapot
The message is silent as to the shortness and stoutness.
.
Better yet, see if you can grab a whole bunch of pigeons and create an IPoAC network to deliver the HTCPCP data. Don't know where you'd stick the Ethernet shield though.