Companion

object Companion

Functions

Link copied to clipboard
fun file(path: String): Url

Builds a file://-scheme Url pointing at path (platform-specific: filesystem path on the JVM).

Link copied to clipboard
fun http(host: String = "", port: Int? = null, path: String = "", query: String? = null): Url

Shorthand for remote with protocol = "http".

Link copied to clipboard
fun https(host: String = "", port: Int? = null, path: String = "", query: String? = null): Url

Shorthand for remote with protocol = "https".

Link copied to clipboard
fun of(string: String): Url

Parses string into a Url, e.g. Url.of("https://example.com/page").

Link copied to clipboard
fun remote(protocol: String, host: String = "", port: Int? = null, path: String = "", query: String? = null): Url

Builds a Url with the given protocol and, optionally, host, port, path and query.