#pragma once #include #include namespace ts6bot::url { // Percent-encode a string for use as a query parameter value. std::string EncodeComponent(const std::string& s); struct HttpUrl { std::string host; uint16_t port{}; std::string path; // begins with '/' }; // Minimal parser for redirect URIs. // Supports: http://:/ // Throws std::runtime_error on invalid input. HttpUrl ParseHttpUrl(const std::string& httpUrl); } // namespace ts6bot::url