4#include "../Foundation/Result.h"
5#include "../Strings/StringView.h"
35 [[nodiscard]]
Result parsePath();
36 [[nodiscard]]
Result parseHost();
37 [[nodiscard]]
Result validateProtocol();
38 [[nodiscard]]
Result validatePath();
39 [[nodiscard]]
Result validateHost();
#define SC_COMPILER_EXPORT
Macro for symbol visibility in non-MSVC compilers.
Definition: Compiler.h:78
unsigned short uint16_t
Platform independent (2) bytes unsigned int.
Definition: PrimitiveTypes.h:37
Parse an URL splitting it into its base components.
Definition: HttpURLParser.h:17
StringView hostname
Returns site.com (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:21
StringView host
Returns site.com:80 (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:23
StringView path
Returns /pa/th?q=val (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:25
StringView protocol
Returns http (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:18
StringView search
Returns ?q=val (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:26
uint16_t port
Returns 80 (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:22
StringView password
Returns pass (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:20
StringView hash
Returns #hash (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:27
StringView pathname
Returns /pa/th (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:24
Result parse(StringView url)
Parse StringView representing an URL.
StringView username
Returns user (from http://user:pass@site.com:80/pa/th?q=val#hash)
Definition: HttpURLParser.h:19
An ascii string used as boolean result. SC_TRY macro forwards errors to caller.
Definition: Result.h:11
Non-owning view over a range of characters with UTF Encoding.
Definition: StringView.h:47