//okhttp/okhttp3/HttpUrl/Companion/toHttpUrlOrNull
toHttpUrlOrNull¶
[jvm]\
@JvmName(name = "parse")
fun String.toHttpUrlOrNull(): HttpUrl?
Returns a new HttpUrl
representing url
if it is a well-formed HTTP or HTTPS URL, or null if it isn’t.
[jvm]\
@JvmName(name = "get")
fun URL.toHttpUrlOrNull(): HttpUrl?
Returns an HttpUrl for this if its protocol is http
or https
, or null if it has any other protocol.
[jvm]\
@JvmName(name = "get")
fun URI.toHttpUrlOrNull(): HttpUrl?