Added a new HTTPParser class.

This commit is contained in:
Relintai 2022-06-30 21:22:42 +02:00
parent 089431e902
commit 228cfca0eb
5 changed files with 31 additions and 1 deletions

View File

@ -22,11 +22,14 @@ sources = [
"http/web_server_middleware.cpp", "http/web_server_middleware.cpp",
"http/web_server_request.cpp", "http/web_server_request.cpp",
"http/http_parser.cpp",
"html/html_builder_bind.cpp", "html/html_builder_bind.cpp",
"http_server_simple/http_server_simple.cpp", "http_server_simple/http_server_simple.cpp",
"http_server_simple/web_server_simple.cpp", "http_server_simple/web_server_simple.cpp",
"http_server_simple/simple_web_server_request.cpp", "http_server_simple/simple_web_server_request.cpp",
] ]
if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes': if ARGUMENTS.get('custom_modules_shared', 'no') == 'yes':

View File

@ -26,6 +26,7 @@ def get_doc_classes():
"WebServerCookie", "WebServerCookie",
"WebServerMiddleware", "WebServerMiddleware",
"WebServerRequest", "WebServerRequest",
"HTTPParser",
"HTMLBuilder", "HTMLBuilder",
"HTMLTag", "HTMLTag",

View File

@ -0,0 +1,10 @@
#include "http_parser.h"
HTTPParser::HTTPParser() {
}
HTTPParser::~HTTPParser() {
}
void HTTPParser::_bind_methods() {
}

View File

@ -0,0 +1,15 @@
#ifndef HTTP_PARSER_H
#define HTTP_PARSER_H
#include "core/reference.h"
class HTTPParser : public Reference {
public:
HTTPParser();
~HTTPParser();
protected:
static void _bind_methods();
};
#endif

View File

@ -29,6 +29,7 @@ SOFTWARE.
#include "html/html_builder_bind.h" #include "html/html_builder_bind.h"
#include "http/csrf_token.h" #include "http/csrf_token.h"
#include "http/http_parser.h"
#include "http/http_server_enums.h" #include "http/http_server_enums.h"
#include "http/http_session.h" #include "http/http_session.h"
#include "http/http_session_manager.h" #include "http/http_session_manager.h"
@ -62,7 +63,7 @@ void register_web_types() {
ClassDB::register_class<WebServerMiddleware>(); ClassDB::register_class<WebServerMiddleware>();
ClassDB::register_class<WebServerRequest>(); ClassDB::register_class<WebServerRequest>();
ClassDB::register_class<WebServerSimple>(); ClassDB::register_class<HTTPParser>();
} }
void unregister_web_types() { void unregister_web_types() {