f
Fork of lwip by
Diff: examples/HTTPClient/main.cpp
- Revision:
- 0:5e1631496985
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/examples/HTTPClient/main.cpp Tue May 08 15:32:10 2012 +0100 @@ -0,0 +1,23 @@ +#include "mbed.h" +#include "HTTPClient.h" + +using namespace std; + +DigitalOut led(LED1); +HTTPClient http; + +const char user[] = "<username>"; +const char pass[] = "<password>"; +const char msg[] = "status=<message>"; +const char url[] = "http://twitter.com/statuses/update.xml"; + +int main(void) { + http.auth(user, pass); + http.post(url, msg); + + while(1) { + led = !led; + wait(0.2); + } +} +