exchangeList

inline fun <T : Any> BlockingHttpClient.exchangeList(request: HttpRequest<Any>): HttpResponse<List<T>>

Perform an HTTP request for the given request object emitting the full HTTP response from returned org.reactivestreams.Publisher and converting the response body to a list of the specified type. Allowing for client.exchangeList<Hero>(HttpRequest.GET("/heroes/any")) instead of client.exchange(HttpRequest.GET<Any>("/heroes/any"), Argument.listOf(Hero::class.java)).

Return

The full HttpResponse with response body as an instance of List

Parameters

T

The response body type

request

The HttpRequest you want to perform