|
|
@ -15,13 +15,12 @@ class StrResponse private constructor( |
|
|
|
) { |
|
|
|
) { |
|
|
|
fun raw() = rawResponse |
|
|
|
fun raw() = rawResponse |
|
|
|
|
|
|
|
|
|
|
|
val url: String |
|
|
|
fun url(): String { |
|
|
|
get() { |
|
|
|
rawResponse.networkResponse?.let { |
|
|
|
rawResponse.networkResponse?.let { |
|
|
|
return it.request.url.toString() |
|
|
|
return it.request.url.toString() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return rawResponse.request.url.toString() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return rawResponse.request.url.toString() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
fun code(): Int { |
|
|
|
fun code(): Int { |
|
|
|
return rawResponse.code |
|
|
|
return rawResponse.code |
|
|
@ -35,8 +34,7 @@ class StrResponse private constructor( |
|
|
|
return rawResponse.headers |
|
|
|
return rawResponse.headers |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
val isSuccessful: Boolean |
|
|
|
fun isSuccessful(): Boolean = rawResponse.isSuccessful |
|
|
|
get() = rawResponse.isSuccessful |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
fun errorBody(): ResponseBody? { |
|
|
|
fun errorBody(): ResponseBody? { |
|
|
|
return errorBody |
|
|
|
return errorBody |
|
|
|