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