Last active
November 19, 2019 18:10
-
-
Save RoRoche/f976f5c7a636ac8d8e8a6c986e008381 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import okhttp3.Response | |
class WithBodyRestRequest(origin: RestRequest) : RestRequest.Wrap(origin) { | |
override fun response(): Response { | |
val response = super.response() | |
if (response.body != null) { | |
return response | |
} else { | |
throw NoBodyRestResponseException() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment