setPath
Set or replace the path component of a URL.
url(required): the URL stringpath(required): new path to set
utlx
setPath("https://example.com/old/path", "/api/v2/resource")
// "https://example.com/api/v2/resource"