{"id":13421072,"url":"https://github.com/lyokato/cpp-urilite","last_synced_at":"2025-12-30T04:10:40.698Z","repository":{"id":1332595,"uuid":"1278358","full_name":"lyokato/cpp-urilite","owner":"lyokato","description":"C++ uri handler(encode, decode, parse and build)","archived":false,"fork":false,"pushed_at":"2011-01-29T07:18:56.000Z","size":343,"stargazers_count":15,"open_issues_count":1,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T22:57:48.188Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lyokato.png","metadata":{"files":{"readme":"README","changelog":"Changes","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2011-01-21T13:15:22.000Z","updated_at":"2021-10-07T09:49:33.000Z","dependencies_parsed_at":"2022-08-16T13:10:20.289Z","dependency_job_id":null,"html_url":"https://github.com/lyokato/cpp-urilite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyokato%2Fcpp-urilite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyokato%2Fcpp-urilite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyokato%2Fcpp-urilite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lyokato%2Fcpp-urilite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lyokato","download_url":"https://codeload.github.com/lyokato/cpp-urilite/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243701277,"owners_count":20333615,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:48.271Z","updated_at":"2025-12-30T04:10:40.655Z","avatar_url":"https://github.com/lyokato.png","language":"C","readme":"=======================================================================\n DESCRIPTION\n=======================================================================\nThis library allows you to handle uri easility ( just for HTTP )\n\n=======================================================================\n DEPENDENCIES\n=======================================================================\n\u003cboost/foreach.hpp\u003e\n\u003cboost/lexical_cast.hpp\u003e\n\u003cboost/format.hpp\u003e\n\u003cboost/utility.hpp\u003e\n\u003cboost/algorithm/string.hpp\u003e\n\n=======================================================================\n SYNOPSIS\n=======================================================================\n#include \u003cstring\u003e\n#include \u003curilite.h\u003e\n\nusing namespace urilite;\n\n// RFC3986 style percent encoding\nstd::string encoded = uri::encode(\"val ue\");\nstd::string decoded = uri::decode(encoded);\n\n// RFC2396 style, same as JavaScript's encodeURIComponent\nstd::string encoded2 = uri::encodeURIComponent(string);\nstd::string decoded2 = uri::decode(encoded2);\n\n// These encoding methods encode each of whitespaces to '%20' according to\n// percent encoding spec.\n// If you want to encode ' ' to '+', you use 'encode2' or 'encodeURICompoent2'\n// instead. And you can use 'decode2' decoding method for that purpose.\n\nuri u = uri::parse(\"http://example.org/path?q1=v1\u0026q2=v2#frag\");\nstd::string scheme  = u.scheme();\nstd::string host    = u.host();\nstd::string path    = u.path();\nunsigned short port = u.port();\n\nstd::string query_string = u.query_string();\n\nuri::query_params params = u.query();\nfor(uri::query_params::const_iterator iter = params.begin();\n    iter != params.end();\n    ++iter) {\n    std::cout \u003c\u003c iter-\u003efirst  \u003c\u003c std::endl;\n    std::cout \u003c\u003c iter-\u003esecond \u003c\u003c std::endl;\n}\n\nBOOST_FOREACH(uri::query_param p, params) {\n    std::cout \u003c\u003c p.first  \u003c\u003c std::endl;\n    std::cout \u003c\u003c p.second \u003c\u003c std::endl;\n}\n\nu.append_query(\"new_key1\", \"new_value1\");\nu.append_query(\"new_key2\", \"new_value2\");\n\nstd::string uri_string = u.str();\n// http://example.org/path?q1=v1\u0026q2=v2#frag \n\nstd::string relative_string = u.relative();\n// /path?q1=v1\u0026q2=v2  This is useful for first line of HTTP Request header\n\nstd::ostringstream os;\nos \u003c\u003c u;\n\n=======================================================================\n INSTALL\n=======================================================================\nThis is header-only library.\nSo, copying urilite.h into your project directory is the easiest way.\n\nor\n\n1. cd build\n2. cmake .. -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release\n\nparameters\n    - BUILD_SHARED_LIBS (ON|OFF)\n    - CMAKE_BUILD_TYPE (Debug|Release)\n    - CMAKE_INSTALL_PREFIX (/usr/local)\n\n3. make\n4. make test\n5. make install\n\n","funding_links":[],"categories":["TODO scan for Android support in followings"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyokato%2Fcpp-urilite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flyokato%2Fcpp-urilite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flyokato%2Fcpp-urilite/lists"}