WORKED CASE · SYNTHETIC TEST DATA
Separate hostname, port and path
The visible host is not always just a hostname.
Input and settings
https://example.com:8080/docs?q=a%20b#introRun and interpret
Paste the URL. Host includes :8080, hostname excludes it, and the decoded query value is a b.
Expected output
example.com:8080
example.com
8080
/docs
a bScope and possible misuse
The parser never visits or validates the destination. Relative paths require a base and are not accepted as absolute URLs here.