#pragma once // Spec: SPEC.md FR-NET-02. Percent encoding for query values and path segments. #include #include #include namespace dp { class UrlCodec { public: // RFC 3986 unreserved characters stay, everything else becomes %XX (UTF-8 bytes). static std::string encode(const std::string& text); static std::string buildQuery(const std::vector>& params); // ws:// and wss:// from http:// and https://. static std::string toWebSocketScheme(const std::string& url); }; } // namespace dp