Quantcast
Channel: Active questions tagged https - Stack Overflow
Viewing all articles
Browse latest Browse all 1515

Connecting to URL requires authentication in Kotlin

$
0
0

I'm beginner in kotlin.
I'm try to connect to my http service, which requires authentication.

Have error:

Unresolved reference: Authenticator

How can I set Authenticator?

var url = URL ("https://myURL")val authenticator = object : Authenticator() {    val passwordAuthentication: PasswordAuthentication?        get() = PasswordAuthentication("user","password".toCharArray()        )}

Viewing all articles
Browse latest Browse all 1515

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>