|
|
@ -80,6 +80,7 @@ object NetworkUtils { |
|
|
|
fun getAbsoluteURL(baseURL: String?, relativePath: String?): String? { |
|
|
|
fun getAbsoluteURL(baseURL: String?, relativePath: String?): String? { |
|
|
|
if (baseURL.isNullOrEmpty()) return relativePath |
|
|
|
if (baseURL.isNullOrEmpty()) return relativePath |
|
|
|
if (relativePath.isNullOrEmpty()) return baseURL |
|
|
|
if (relativePath.isNullOrEmpty()) return baseURL |
|
|
|
|
|
|
|
if (relativePath.isAbsUrl()) return baseURL |
|
|
|
var relativeUrl = relativePath |
|
|
|
var relativeUrl = relativePath |
|
|
|
try { |
|
|
|
try { |
|
|
|
val absoluteUrl = URL(baseURL.substringBefore(",")) |
|
|
|
val absoluteUrl = URL(baseURL.substringBefore(",")) |
|
|
|