From 68ecd088c54d8340be8ce9afa214f09132f45e12 Mon Sep 17 00:00:00 2001 From: Relintai Date: Mon, 1 Nov 2021 21:20:42 +0100 Subject: [PATCH] Added more helpers to Request. --- core/http/request.cpp | 10 ++++++++++ core/http/request.h | 5 ++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/core/http/request.cpp b/core/http/request.cpp index eb3a033..46406dc 100644 --- a/core/http/request.cpp +++ b/core/http/request.cpp @@ -235,6 +235,16 @@ String Request::get_url_site() const { return path; } +String Request::get_url_root_parent(const String &add) const { + return get_url_root_parent() + add; +} +String Request::get_url_root(const String &add) const { + return get_url_root() + add; +} +String Request::get_url_site(const String &add) const { + return get_url_site() + add; +} + String Request::get_host() const { return ""; } diff --git a/core/http/request.h b/core/http/request.h index 07ef4ee..25219c7 100644 --- a/core/http/request.h +++ b/core/http/request.h @@ -78,8 +78,11 @@ public: String get_url_root_parent() const; String get_url_root() const; String get_url_site() const; - + String get_url_root_parent(const String &add) const; + String get_url_root(const String &add) const; + String get_url_site(const String &add) const; + virtual void update(); virtual void pool();