Added in API level 1

HttpsURLConnection

abstract class HttpsURLConnection : HttpURLConnection
kotlin.Any
   ↳ java.net.URLConnection
   ↳ java.net.HttpURLConnection
   ↳ javax.net.ssl.HttpsURLConnection

HttpsURLConnection extends HttpURLConnection with support for https-specific features.

See http://www.w3.org/pub/WWW/Protocols/ and RFC 2818 for more details on the https specification.

This class uses HostnameVerifier and SSLSocketFactory. There are default implementations defined for both classes. However, the implementations can be replaced on a per-class (static) or per-instance basis. All new HttpsURLConnections instances will be assigned the "default" static values at instance creation, but they can be overriden by calling the appropriate per-instance set method(s) before connecting.

Summary

Inherited constants
Protected constructors

Creates an HttpsURLConnection using the URL specified.

Public methods
abstract String!

Returns the cipher suite in use on this connection.

open static HostnameVerifier!

Gets the default HostnameVerifier that is inherited by new instances of this class.

open static SSLSocketFactory!

Gets the default static SSLSocketFactory that is inherited by new instances of this class.

open HostnameVerifier!

Gets the HostnameVerifier in place on this instance.

abstract Array<Certificate!>!

Returns the certificate(s) that were sent to the server during handshaking.

open Principal!

Returns the principal that was sent to the server during handshaking.

open Principal!

Returns the server's principal which was established as part of defining the session.

open SSLSocketFactory!

Gets the SSL socket factory to be used when creating sockets for secure https URL connections.

abstract Array<Certificate!>!

Returns the server's certificate chain which was established as part of defining the session.

open static Unit

Sets the default HostnameVerifier inherited by a new instance of this class.

open static Unit

Sets the default SSLSocketFactory inherited by new instances of this class.

open Unit

Sets the HostnameVerifier for this instance.

open Unit

Sets the SSLSocketFactory to be used when this instance creates sockets for secure https URL connections.

Inherited functions