vncore / com.venuenext.vncore.protocol / HttpInterface / call

call

abstract fun <T : Any> call(request: HttpRequest, serializer: KSerializer<T>? = null): 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.

abstract fun <T : Any> call(request: HttpRequest, serializer: KSerializer<T>? = null, 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.