A fragment identifies a secondary resource indirectly and is never sent to the origin server, so it plays no part
in what is reported: a target and the same target carrying a fragment are requested alike and compare equal.
A target is reported parsed, so that the scheme, the origin and the path are read without parsing it again and a
reference is resolved against it. A target stated as a string is accordingly required to be absolute: a relative
reference is the consumer's to resolve against the applicable base URI before the exchange is performed.
Parameters
input: RequestInfo|URL
The request or target URL the target URI is to be retrieved from
Returns URL
The target URI identifying the resource input is addressed to, stripped of any fragment
Throws
If input states a target that is not an absolute URI
Retrieves the target URI of a request.
A fragment identifies a secondary resource indirectly and is never sent to the origin server, so it plays no part in what is reported: a target and the same target carrying a fragment are requested alike and compare equal.
A target is reported parsed, so that the scheme, the origin and the path are read without parsing it again and a reference is resolved against it. A target stated as a string is accordingly required to be absolute: a relative reference is the consumer's to resolve against the applicable base URI before the exchange is performed.