Client-side typesafe Spine schema usage • opensavvy.spine.client • bodyOrThrow
bodyOrThrow¶
inline suspend fun <Out : Any> SpineResponse<Out, *>.bodyOrThrow(): Out
Deserializes the response body, throwing a SpineReceptionException if the response is not successful.
The Ktor ContentNegotation plugin may be necessary for this function to work.
Example¶
See also¶
-
bodyOrNullReturnnullon failure. -
handleHandle failures exhaustively.