Working Multithreaded HTTP Server using WiFly module. Currently only supporting GET method.

Dependencies:   WiFlyHTTPServer WiflyInterface mbed-rpc mbed-rtos mbed

RTOS Wifly HTTP Server

This sample application demonstrates how the HTTP Server can be used in a multithreaded (RTOS) Environment. However currently only the GET method is supported.

Revision:
0:9c6ebc97c758
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Jun 26 21:13:55 2013 +0000
@@ -0,0 +1,32 @@
+#include "mbed.h"
+#include "HttpServer.h"
+#include "FsHandler.h"
+#include "LocalFileSystem.h"
+
+DigitalOut myled(LED1);
+
+Serial pc(USBTX, USBRX, "pc");
+
+static LocalFileSystem  local("local");
+
+
+int main() {
+    pc.baud(460800);
+
+    HTTPFsRequestHandler::mount("/local/", "/");
+       
+    HttpServer  svr(p9, p10, p30, p29, "Spawnpoint", "Quantenoptik1", WPA);
+    
+    svr.addHandler<HTTPFsRequestHandler>("/");
+    //  Start the server
+    if (!svr.start(80) ) {
+        error("SERVER FAILED TO START");
+    }
+    
+    while(1) {
+        myled = 1;
+        wait(0.2);
+        myled = 0;
+        wait(0.2);
+    }
+}