tweet test

Dependencies:   mbed lwip

Files at this revision

API Documentation at this revision

Comitter:
shokai
Date:
Wed Apr 21 13:27:36 2010 +0000
Commit message:

Changed in this revision

HTTPClient.lib Show annotated file Show diff for this revision Revisions of this file
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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HTTPClient.lib	Wed Apr 21 13:27:36 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_unsupported/code/lwip/
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Apr 21 13:27:36 2010 +0000
@@ -0,0 +1,27 @@
+#include "mbed.h"
+#include "HTTPClient.h"
+using namespace std;
+
+DigitalOut led(LED1);
+
+HTTPClient http; // use DHCP
+
+/* // use static IP
+HTTPClient http("mbed", // hostname.
+                IPv4(192,168,1,39), // IPv4 address
+                IPv4(255,255,255,0), // netmask
+                IPv4(192,168,1,1), // default gateway
+                IPv4(192,168,1,1)); // dns server
+/**/
+
+const char msg[] = "status=mbed test";
+
+int main(void) {
+    http.auth("username", "password");
+    http.post("http://twitter.com/statuses/update.xml", msg);
+  
+    while(1) {
+        led = !led;
+        wait(0.2);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Apr 21 13:27:36 2010 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/49a220cc26e0