Single instance HTTP Server using WiFly Interface.

Dependents:   WiFlyHTTPServerSample MultiThreadingHTTPServer

This is my implementation for a HTTP Server using the WiFly Interface. Please note that this is still under development.

It may still contain several bugs. I have tested it using a 1768 on an application board plus RN-XV board.

Currently there is only a FileSystem implemented. Also it is limited to GET request.

I try to extend it further so it will be more useful.

Btw, it does NOT work with RTOS, which seems not to be the Problem of my library.

Do not Forget to Import the WiFly Interface into your Project when using this library.

Change History:

REV5: - added support for basic RPC GET request functionality.

REV4: - added argument parsing from the request uri. - documentation extended and updated.

Revision:
4:d065642c32cc
Parent:
3:d6224049b3bf
Child:
5:dc88012caef1
diff -r d6224049b3bf -r d065642c32cc HTTPRequestHandler.h
--- a/HTTPRequestHandler.h	Tue May 28 01:56:14 2013 +0000
+++ b/HTTPRequestHandler.h	Tue May 28 21:20:58 2013 +0000
@@ -33,6 +33,7 @@
 /** class HTTPRequestHandler is the base class for HTTP Handler request implementations.
 *
 */
+
 class HTTPRequestHandler
 {
     protected:
@@ -49,8 +50,12 @@
         virtual ~HTTPRequestHandler();
         
         /** Handler function which will be used by the HTTPServer to serve requests.
-        * @param msg : Request Message information.
-        * @param tcp : The socket which represents the active connection to the client.
+        * The default version of this function will dispatch respective handler member
+        * functions according to the request type given in the HTTPMessage object.
+        * The list of possible functions dispatched is :
+        * * handleGetRequest
+        * * handlePostRequest
+        * * handlePutRequest
         */
         virtual void handleRequest();
         
@@ -74,18 +79,17 @@
         void endResponse();
 
     protected:
-        /** Handler function to serve GET requests
+        /** Handler function to serve GET requests. Download ressource from server from \c uri location.
         */
         virtual int handleGetRequest() = 0;
         
-        /** Handler function to serve PUT requests
+        /** Handler function to serve PUT requests. Upload ressource to server to \c uri location.
         */
-//        virtual int handlePutRequest() = 0;
+        virtual int handlePutRequest() = 0;
         
-        /** Handler function to serve POST requests
+        /** Handler function to serve POST requests. Send data to webserver. Can also be appended to uri.
         */
-//        virtual int handlePostRequest() = 0;
-
+        virtual int handlePostRequest() = 0;
 };
 
 #endif //   __HTTPREQUESTHANDLER_H__
\ No newline at end of file