webtoolsUrl

fun MockWebServer.webtoolsUrl(path: String = "/"): Url(source)

An http URL on the address this server is bound to, written as an IP literal, so the loopback relaxation admits it on every operating system and the URL never reaches the resolver. Never hostName or url(): both reverse-resolve an address created without a name. An HTTPS server's URL is built by hand. A server bound to another 127.0.0.0/8 address gets the address exemption but not the port exemption.

Stable Core, source compatibility only.

Return

the URL.

Parameters

path

the path, with any query, starting with /; / by default.

Throws

if path does not start with /.

if the server is not started, or is not bound to a loopback address.