summaryrefslogtreecommitdiffhomepage
path: root/dev
diff options
context:
space:
mode:
authorAmlal <amlal@nekernel.org>2025-08-11 17:18:08 +0200
committerAmlal <amlal@nekernel.org>2025-08-11 17:18:08 +0200
commit67228fbbe3a1147dee3043d0609c9b903d4d0391 (patch)
treebcbbd019a91eabd4dbd409109df963dc8fde4713 /dev
parent1d9328259052be88b86b958fdb1b2396307cacdb (diff)
wip: url: module implementation in progress
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev')
-rw-r--r--dev/lib/net/url.hpp30
1 files changed, 29 insertions, 1 deletions
diff --git a/dev/lib/net/url.hpp b/dev/lib/net/url.hpp
index 0506cd3..5dc0d03 100644
--- a/dev/lib/net/url.hpp
+++ b/dev/lib/net/url.hpp
@@ -9,10 +9,38 @@
#include <string>
#include <iostream>
+#include <sstream>
+
+/// @author Amlal El Mahrouss (founder@snu.systems)
namespace snu::net
{
template <typename char_type>
class basic_url;
-} \ No newline at end of file
+ /// @brief Basic URL parser container.
+ template <typename char_type>
+ class basic_url final
+ {
+ std::basic_stringstream<char_type> ss_{};
+
+ public:
+ explicit basic_url() = default;
+ ~basic_url() = default;
+
+ basic_url& operator=(const basic_url&) = default;
+ basic_url(const basic_url&) = default;
+
+ basic_url& operator/=(const std::basic_string<char_type>& in)
+ {
+ ss_ += in;
+ return *this;
+ }
+
+ basic_url& operator/=(const char_type& in)
+ {
+ ss_ += in;
+ return *this;
+ }
+ };
+} // namespace snu::net