Minimal URL parser + builder utility. More...
#include <cstdint>#include <optional>#include <string>#include <string_view>#include <utility>#include <vector>Go to the source code of this file.
Classes | |
| struct | pulp::runtime::Url |
| Parsed URL components. More... | |
Namespaces | |
| namespace | pulp |
| namespace | pulp::runtime |
Functions | |
| std::string | pulp::runtime::percent_encode (std::string_view s) |
| Percent-encode s per RFC 3986 — unreserved characters (A-Z a-z 0-9 - _ . | |
| std::string | pulp::runtime::percent_decode (std::string_view s) |
| Decode percent-escapes — %20 → space, %2F → /. | |
| std::string | pulp::runtime::form_encode (std::string_view s) |
| application/x-www-form-urlencoded style — space → +, then percent-encode everything else. | |
| std::string | pulp::runtime::form_decode (std::string_view s) |
| Reverse of form_encode. + decodes to space. | |
| std::vector< std::pair< std::string, std::string > > | pulp::runtime::parse_query (std::string_view query) |
| Parse a URL query string into key/value pairs. | |
| std::string | pulp::runtime::build_query (const std::vector< std::pair< std::string, std::string > > ¶ms) |
| Build a query string from key/value pairs. | |
Minimal URL parser + builder utility.
Transport already lives in http_* and http_download; this header adds the structural parse/build that callers need for query-string manipulation, scheme dispatch, and round-tripping a URL through state.
Scope: