summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 09:57:50 -0500
committerAmlal El Mahrouss <amlal@nekernel.org>2025-11-29 09:57:50 -0500
commit463a0c01f96d86c9c91f02903bc1d194c5e55b15 (patch)
tree913c82e8c40c1963751dc4d5052d41d72dad6680 /examples
parent83bdb3bd0ce5ca6301aec047c1886c8d00e34085 (diff)
chore&feat: basic URL API.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'examples')
-rw-r--r--examples/url/CMakeLists.txt15
-rw-r--r--examples/url/url.cc24
2 files changed, 39 insertions, 0 deletions
diff --git a/examples/url/CMakeLists.txt b/examples/url/CMakeLists.txt
new file mode 100644
index 0000000..7195d6c
--- /dev/null
+++ b/examples/url/CMakeLists.txt
@@ -0,0 +1,15 @@
+
+cmake_minimum_required(VERSION 3.15...3.31)
+
+project(
+ Url
+ VERSION 1.0
+ LANGUAGES CXX)
+
+find_package(Boost REQUIRED COMPONENTS container)
+
+add_executable(Url fix.cc)
+
+set_property(TARGET Url PROPERTY CXX_STANDARD 20)
+target_include_directories(Url PUBLIC ../../include/ocl)
+target_link_libraries(Url PRIVATE Boost::container)
diff --git a/examples/url/url.cc b/examples/url/url.cc
new file mode 100644
index 0000000..b4cc924
--- /dev/null
+++ b/examples/url/url.cc
@@ -0,0 +1,24 @@
+/*
+ fix example
+ Written by Amlal El Mahrouss.
+ Licensed under the Boost Software License
+ */
+
+#include <core/error_handler.hpp>
+#include <net/url.hpp>
+#include <unistd.h>
+#include <io/print.hpp>
+#include <sys/socket.h>
+
+/* finally test it */
+int main(int argc, char** argv)
+{
+ ocl::net::url url_type(ocl::net::url::file);
+
+ url_type /= "bin";
+ url_type /= "ls";
+
+ ocl::io::println(url_type.assemble());
+
+ return EXIT_SUCCESS;
+}