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