updateUrl
For APIs using the mainUrl in the prefix for MainAPI::load
, this function replaces the scheme
, host
and port
from an old link to the new mainUrl.
https://en.wikipedia.org/wiki/Uniform_Resource_Identifier
userinfo host port
┌──┴───┐ ┌──────┴──────┐ ┌┴─┐
https://john.doe@www.example.com:1234/forum/questions/?tag=networking&order=newest#:~:text=whatever
└─┬─┘ └─────────────┬─────────────┘└───────┬───────┘ └────────────┬────────────┘ └───────┬───────┘
scheme authority path query fragment
Content copied to clipboard