makeRequest

suspend fun <Result> HttpClient.makeRequest(url: String, resultMapper: suspend (HttpResponse) -> Result): Result

Makes a web request to the specified URL and returns the result of the request.

Internal API.

Return

The result of the request.

Parameters

Result

The type of the result of the request.

url

The URL to make the request to.

resultMapper

A function that maps the HTTP response to the result type.

Throws

If the request fails.