From 463a0c01f96d86c9c91f02903bc1d194c5e55b15 Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Sat, 29 Nov 2025 09:57:50 -0500 Subject: chore&feat: basic URL API. Signed-off-by: Amlal El Mahrouss --- examples/url/CMakeLists.txt | 15 +++++++++++++++ examples/url/url.cc | 24 ++++++++++++++++++++++++ 2 files changed, 39 insertions(+) create mode 100644 examples/url/CMakeLists.txt create mode 100644 examples/url/url.cc (limited to 'examples') 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 +#include +#include +#include +#include + +/* 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; +} -- cgit v1.2.3