vncore / com.venuenext.vncore.http / HttpClient / call

call

open fun <T : Any> call(request: HttpRequest, serializer: KSerializer<T>?): HttpResponse<T>

Makes an HTTP request call, and serializes response.

Parameters

request - the HTTP request object.

serializer - the result data serializer.

Return
the HTTP response object.

open fun <T : Any> call(request: HttpRequest, serializer: KSerializer<T>?, success: (result: HttpResponse<T>) -> Unit, failure: (Exception) -> Unit): Unit

Makes an HTTP request call, and serializes response.

Parameters

request - the HTTP request object.

serializer - the result data serializer.

success - the success callback with HTTP response argument.

failure - the failure callback with exception argument.