1
0
mirror of https://github.com/DCC-EX/CommandStation-EX.git synced 2024-11-23 08:06:13 +01:00
CommandStation-EX/HTTPParser.cpp
Asbelos 68f47dae17 HTTPParser framework
Beware needs uplifted wifi buffer
2020-06-28 12:45:31 +01:00

12 lines
497 B
C++

#include "HTTPParser.h"
#include "StringFormatter.h"
void HTTPParser::parse(Print & stream, char * cmd) {
// BEWARE - As soon as you start responding, the cmd buffer is trashed!
// You must get everything you need from it before using StringFormatter::send!
StringFormatter::send(stream,F("HTTP/1.1 200 OK\nContent-Type: text/html\nConnnection: close\n\n"));
StringFormatter::send(stream,F("<html><body>This is <b>not</b> a web server.<br/></body></html>"));
}