okhttp / okhttp3 / HttpUrl / get

get

@JvmStatic fun get(url: String): HttpUrl

Returns a new HttpUrl representing url.

Exceptions

IllegalArgumentException - If url is not a well-formed HTTP or HTTPS URL.

@JvmStatic fun get(url: URL): HttpUrl?

Returns an HttpUrl for url if its protocol is http or https, or null if it has any other protocol.

@JvmStatic fun get(uri: URI): HttpUrl?