Simple HTTP Client Example with HTTPClient class

Dependencies:   HTTPClient mbed-rtos mbed-src

Revision:
2:caac3459ca52
Parent:
1:24d373f4f0ea
--- a/main.cpp	Mon Dec 01 01:10:41 2014 +0000
+++ b/main.cpp	Mon Dec 01 01:20:02 2014 +0000
@@ -4,11 +4,11 @@
 
 #define HOST "192.168.1.12"
 
-EthernetInterface eth;
-HTTPClient http;
-char str[1024*20];
+static HTTPClient http;
+static char str[1024*20];
   
 void main_body(void const *av) {
+
     char url[100] ;
     int ret ;
     //GET data
@@ -26,6 +26,8 @@
 
 }
 
+static EthernetInterface eth;
+
 int main()
 {
     int ret ;
@@ -37,10 +39,9 @@
         if(ret == 0)break ;
     }
     printf("IP = %s\n", eth.getIPAddress());
-    
-    #define STACK_SIZE 20000
-    //Thread t(main_body, NULL, osPriorityNormal, STACK_SIZE);
+
     main_body(av) ;
+
     eth.disconnect();  
     while(1) {
     }