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#intro

Run 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 b

Scope and possible misuse

The parser never visits or validates the destination. Relative paths require a base and are not accepted as absolute URLs here.

Unexpected result? Report a minimal example