HTTPServer/__index.h
2022-06-29 11:38:44 -07:00

33 lines
978 B
C++

#ifndef ____index_h__
#define ____index_h__
#include "HTTPPage.h"
#include "IMFHeader.h"
namespace http {
class __index : public HTTPPage {
int page(HTTPParameters &p) override {
p.data << "<html>"
" <head>"
" <link rel=\"icon\" type=\"image/x-icon\" href=\"/favicon.ico\" />"
" <link type=\"text/css\" rel=\"stylesheet\" href=\"/style\" />"
" <script src=\"/script\"></script>"
" </head>"
" <body ondragstart=\"return false;\" "
" ondrop=\"return false;\" "
" onLoad=\"getPage('/welcome','main');\">"
" <div id=\"main\">If you see this then something is wrong.</div>"
" </body>"
"</html>";
p.httpRequest.response.addHeader(coreutils::IMFHeader("Content-Type", "text/html"));
return true;
}
};
}
#endif