All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.slink.http.SlinkHttpException.kt Maven / Gradle / Ivy

package io.slink.http

import okhttp3.Response

class SlinkHttpException(
        val url: String,
        val code: Int,
        val responseBody: String
) : RuntimeException("Error on HTTP request ${url}. Status code is $code and response body is $responseBody") {

    constructor(response: Response) : this(response.request.url.toString(), response.code, response.text())
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy