fetch

inline suspend fun <T> Client.fetch(request: <Error class: unknown class>): <Error class: unknown class><T>

Fetches the response to sending the given request, mapping the response body into T.


inline suspend fun <T> Client.fetch(uri: String, noinline block: RequestSpec.() -> Unit = {}): <Error class: unknown class>

Fetches the response to sending a request to the given URI, mapping the response body into T. The request has a GET method by default. A spec block can be optionally passed to customize the request.


suspend fun <T> Client.fetch(uri: String, bodyHandler: <Error class: unknown class><T>, block: RequestSpec.() -> Unit = {}): <Error class: unknown class><T>

Fetches the response sending a request to the given URI, mapping the response body with the given BodyHandler. The request has a GET method by default. A spec block can be optionally passed to customize the request.