Encodes this URL as a complete path.
Encodes this URL as a complete path. This is primarily useful for caching to a file while avoiding duplicates with
the same file name. For example:
Would be encoded to:
whether the port should be included as a part of the path. Defaults to false.