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

Dependencies:   mbed lwip

main.cpp

Committer:
chris
Date:
2010-03-09
Revision:
0:adb1a5407ab9

File content as of revision 0:adb1a5407ab9:

#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);
    }
}