newHttpClient

fun newHttpClient(expectSuccess: Boolean = false): HttpClient

Creates a new HttpClient configured with HttpTimeout support.

Return

a new HttpClient instance

Parameters

expectSuccess

if true, non-2xx responses will throw exceptions