Parse an URL splitting it into its base components. More...
#include <HttpURLParser.h>
Public Member Functions | |
Result | parse (StringView url) |
Parse StringView representing an URL. More... | |
Public Attributes | |
StringView | protocol |
Returns http (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
StringView | username |
Returns user (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
StringView | password |
Returns pass (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
StringView | hostname |
Returns site.com (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
uint16_t | port |
Returns 80 (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
StringView | host |
Returns site.com:80 (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
StringView | pathname |
Returns /pa/th (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
StringView | path |
Returns /pa/th?q=val (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
StringView | search |
Returns ?q=val (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
StringView | hash |
Returns #hash (from http://user:pass@site.com:80/pa/th?q=val#hash ) More... | |
Parse an URL splitting it into its base components.
Result SC::HttpURLParser::parse | ( | StringView | url | ) |
Parse StringView representing an URL.
url | The url to be parsed |
StringView SC::HttpURLParser::hash |
Returns #hash
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
StringView SC::HttpURLParser::host |
Returns site.com:80
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
StringView SC::HttpURLParser::hostname |
Returns site.com
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
StringView SC::HttpURLParser::password |
Returns pass
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
StringView SC::HttpURLParser::path |
Returns /pa/th?q=val
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
StringView SC::HttpURLParser::pathname |
Returns /pa/th
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
uint16_t SC::HttpURLParser::port |
Returns 80
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
StringView SC::HttpURLParser::protocol |
Returns http
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
StringView SC::HttpURLParser::search |
Returns ?q=val
(from http://user:pass@site.com:80/pa/th?q=val#hash
)
StringView SC::HttpURLParser::username |
Returns user
(from http://user:pass@site.com:80/pa/th?q=val#hash
)