Verifies that the variable is a valid URL string and returns the validated string.
The validation is performed by passing the URL string to the Node.js URL constructor.
Note that URLs without paths will have a default path / appended when read,
e.g. https://api.acme.org would become https://api.acme.org/.
Always use URL safe utilities included in the Node.js URL module to create valid URL strings, instead of error prone string concatenation.
Opposed to the default asUrlString, this one will not throw an error in case
a value is empty.
Verifies that the variable is a valid URL string and returns the validated string. The validation is performed by passing the URL string to the Node.js URL constructor.
Note that URLs without paths will have a default path / appended when read, e.g. https://api.acme.org would become https://api.acme.org/. Always use URL safe utilities included in the Node.js URL module to create valid URL strings, instead of error prone string concatenation.
Opposed to the default asUrlString, this one will not throw an error in case a value is empty.