Example twitter program - directly from Rolfs pages, just repackaged for convenient import

Dependencies:   mbed lwip

Files at this revision

API Documentation at this revision

Comitter:
chris
Date:
Tue Mar 09 21:52:33 2010 +0000
Commit message:

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
precomp.lib Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Tue Mar 09 21:52:33 2010 +0000
@@ -0,0 +1,23 @@
+#include "mbed.h"
+#include "HTTPClient.h"
+
+using namespace std;
+
+DigitalOut led(LED1);
+HTTPClient http;
+
+const char user[] = "my-user-name";
+const char pass[] = "my-password";
+const char msg[] = "status=<my 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);
+    }
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Tue Mar 09 21:52:33 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/precomp.lib	Tue Mar 09 21:52:33 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_unsupported/code/lwip/
\ No newline at end of file