sandbox / Mbed OS http-example

Dependencies:   mbed-http

Revision:
32:5fa61ebc2689
Parent:
31:66704f6f17c5
--- a/source/main-http.cpp	Tue Mar 27 11:57:33 2018 +0200
+++ b/source/main-http.cpp	Tue Oct 30 11:07:46 2018 +0800
@@ -3,8 +3,9 @@
 #if DEMO == DEMO_HTTP
 
 #include "mbed.h"
-#include "easy-connect.h"
 #include "http_request.h"
+#include "network-helper.h"
+#include "mbed_mem_trace.h"
 
 void dump_response(HttpResponse* res) {
     printf("Status: %d - %s\n", res->get_status_code(), res->get_status_message().c_str());
@@ -17,10 +18,11 @@
 }
 
 int main() {
-    // Connect to the network (see mbed_app.json for the connectivity method used)
-    NetworkInterface* network = easy_connect(true);
+    // Connect to the network with the default networking interface
+    // if you use WiFi: see mbed_app.json for the credentials
+    NetworkInterface* network = connect_to_default_network_interface();
     if (!network) {
-        printf("Cannot connect to the network, see serial output");
+        printf("Cannot connect to the network, see serial output\n");
         return 1;
     }