@ -80,6 +80,7 @@ object NetworkUtils {
fun getAbsoluteURL(baseURL: String?, relativePath: String?): String? {
if (baseURL.isNullOrEmpty()) return relativePath
if (relativePath.isNullOrEmpty()) return baseURL
if (relativePath.isAbsUrl()) return baseURL
var relativeUrl = relativePath
try {
val absoluteUrl = URL(baseURL.substringBefore(","))
@ -23,8 +23,7 @@ fun String.parseToUri(): Uri {
fun String?.isAbsUrl() =
this?.let {
it.startsWith("http://", true)
|| it.startsWith("https://", true)
it.startsWith("http://", true) || it.startsWith("https://", true)
} ?: false
fun String?.isJson(): Boolean =