execute

open fun <T> execute(url: String, method: HttpMethod, requestCallback: RequestCallback, responseExtractor: ResponseExtractor<T>, urlVariables: Array<Any>): T

Execute the HTTP method to the given URI template, preparing the request with the RequestCallback, and reading the response with a ResponseExtractor.

URI Template variables are expanded using the given URI variables, if any.

Return

an arbitrary object, as returned by the ResponseExtractor

Parameters

url

the URL

method

the HTTP method (GET, POST, etc.)

requestCallback

object that prepares the request

responseExtractor

object that extracts the return value from the response

urlVariables

the variables to expand in the template

<T>

the type of the return value

See also


open fun <T> execute(url: String, method: HttpMethod, requestCallback: RequestCallback, responseExtractor: ResponseExtractor<T>, urlVariables: Map<String, out Any>): T

Execute the HTTP method to the given URI template, preparing the request with the RequestCallback, and reading the response with a ResponseExtractor.

URI Template variables are expanded using the given URI variables map.

Return

an arbitrary object, as returned by the ResponseExtractor

Parameters

url

the URL

method

the HTTP method (GET, POST, etc.)

requestCallback

object that prepares the request

responseExtractor

object that extracts the return value from the response

urlVariables

the variables to expand in the template

<T>

the type of the return value

See also


open fun <T> execute(url: URI, method: HttpMethod, requestCallback: RequestCallback, responseExtractor: ResponseExtractor<T>): T

Execute the HTTP method to the given URL, preparing the request with the RequestCallback, and reading the response with a ResponseExtractor.

Return

an arbitrary object, as returned by the ResponseExtractor

Parameters

url

the URL

method

the HTTP method (GET, POST, etc.)

requestCallback

object that prepares the request

responseExtractor

object that extracts the return value from the response

<T>

the type of the return value

See also