localhost:8080
can’t be a relative reference, as these have to begin with //
(in which case it would be a network-path reference, typically called protocol-relative reference), with /
, or with a path segment that doesn’t contain :
.
(For the latter case, you could use ./localhost:8080
.)
localhost:8080
as part of http://localhost:8080
In the URI http://localhost:8080
, the part localhost:8080
is the authority component.
The part localhost
is the host subcomponent, the part :8080
is the port subcomponent.
localhost:8080
as URI
localhost:8080
itself is, syntactically, also an URI:
localhost
would be the scheme
8080
would be the path
But as localhost
is not a registered URI scheme, localhost:8080
is currently not a valid URI.