summaryrefslogtreecommitdiffhomepage
path: root/examples
diff options
context:
space:
mode:
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;
+}