Networking stack: HTTP Client example

Dependencies:   mbed

Revision:
1:8dbebfb735c0
Child:
2:58122a485856
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/HttpClientExample.cpp	Tue May 25 09:18:09 2010 +0000
@@ -0,0 +1,29 @@
+#include "mbed.h"
+#include "EthernetNetIf.h"
+#include "HttpClient.h"
+
+EthernetNetIf eth; 
+HttpClient http;
+  
+int main() {
+
+  printf("Start\n");
+
+  eth.setup();
+  HttpText txt;
+  
+  HttpResult r = http.get("http://mbed.org/media/uploads/donatien/hello.txt", &txt);
+  if(r==HTTP_OK)
+  {
+    printf("Result :\"%s\"\n", txt.gets()); 
+  }
+  else
+  {
+    printf("Error %d\n", r);
+  }
+  
+  while(1)
+  {
+  
+  }
+}