Joseph PH
12/12/2019, 4:53 AMfun foo(useHttps: Boolean, conn: URLConnection): <Return type should either be HttpURLConnection/HttpURLsConnection> {
// Logic here
return URLConnection as HttpURLConnection/HttpURLsConnection // based on config?
}
Jaymin.Kim
12/12/2019, 6:10 AMsealed class HttpConnection {
class Url(val actual: HttpURLConnection): HttpConnection()
class Urls(val actual: HttpURLsConnect): HttpConnect()
}
Joseph PH
12/12/2019, 6:22 AM