throwOnUnsuccess

inline fun ERROR CLASS: Symbol not found for HttpResponse.throwOnUnsuccess(unsuccessMessage: () -> String)(source)

Throws a ClientRequestException if this HttpResponse does not have a successful status code. A status code is considered successful if it's in the 2xx range.

Parameters

unsuccessMessage

A lambda that provides the error message to use if the response is unsuccessful

Throws

ClientRequestException

if the response status is not successful