JETServer
/home/bradarant/barant/HTTPServer/__index.h
1 #ifndef ____index_h__
2 #define ____index_h__
3 
4 #include "HTTPPage.h"
5 #include "HTTPRequest.h"
6 
7 namespace http {
8 
9  class __index : public HTTPPage {
10 
11  int processCommand(std::string request, core::Session *session, HTTPSession *httpSession, HTTPRequest &httpRequest, std::stringstream &data) override {
12 
13  data << "<html>" << std::endl;
14  data << " <head>" << std::endl;
15  data << " <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />" << std::endl;
16  data << " <link type=\"text/css\" rel=\"stylesheet\" href=\"/style\" />" << std::endl;
17  data << " <script src=\"/script\"></script>" << std::endl;
18  data << " </head>" << std::endl;
19 
20  data << "<body ondragstart=\"return false;\" " << std::endl;
21  data << " ondrop=\"return false;\" " << std::endl;
22  data << " onLoad=\"getPage('/welcome','main');\">" << std::endl;
23  data << " <div id=\"main\">If you see this then something is wrong.</div>" << std::endl;
24  data << " </body>" << std::endl;
25  data << "</html>" << std::endl;
26 
27  httpRequest.response.addHeader("Content-Type", "text/html");
28  return true;
29  }
30  };
31 }
32 
33 #endif
Definition: HTTPSession.h:9
Definition: __index.h:9
Definition: __configure.h:4
Definition: HTTPPage.h:11
Definition: HTTPRequest.h:11