This is a simplest HTTP server made ​​of libMiMic. It will echo back a request path.

Dependencies:   libMiMic mbed-rtos mbed NySDFileSystem

最も簡単なhttpdです。 クライアントから送信されてきたURLをHtmlにして返します。

ModUrlモジュールのサンプルでもあります。

This program is simple httpserver.

This is tutorial for ModUrl module.

Files at this revision

API Documentation at this revision

Comitter:
nyatla
Date:
Sat Apr 06 15:37:21 2013 +0000
Parent:
1:17ecb1647b64
Child:
3:6ffb779c77e6
Commit message:
fix comment;

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sat Apr 06 14:47:44 2013 +0000
+++ b/main.cpp	Sat Apr 06 15:37:21 2013 +0000
@@ -25,9 +25,9 @@
     {
         char url[32];
         int method;
-        //try to ModRomFS module.
+        //call ModUrl module.
         if(this->modurl.execute(i_connection,url,32,&method)){
-            //Otherwise, Send the redirect response to /rom/index.html
+            //send 200 OK and requested URL
             i_connection.sendHeader(200,"text/html",NULL);
             i_connection.sendBodyF("<html><body>Your Request path is %s.</body></html>",url);
             return;