okhttp / okhttp3 / Response / isSuccessful

isSuccessful

val isSuccessful: Boolean

Returns true if the code is in [200..300), which means the request was successfully received, understood, and accepted.