open class HttpClient : HttpInterface
<init> |
HttpClient(context: Context) |
context |
val |
call |
Makes an HTTP request call, and serializes response. open fun <T : Any> call(request: HttpRequest, serializer: KSerializer<T>?): HttpResponse<T> open fun <T : Any> call(request: HttpRequest, serializer: KSerializer<T>?, success: (result: HttpResponse<T>) -> Unit, failure: (Exception) -> Unit): Unit |
readErrorStream |
fun readErrorStream(connection: HttpURLConnection): String |
readInputStream |
Reads response byte array to connection input stream. open fun readInputStream(connection: HttpURLConnection): String |
setRequestHeaders |
Sets request headers in URL connection. open fun setRequestHeaders(connection: HttpURLConnection, request: HttpRequest): Unit |
writeBody |
Writes body byte array to connection output stream. open fun writeBody(connection: HttpURLConnection, request: HttpRequest): Unit |
delete |
fun <T : Any> HttpClient.delete(url: String, authProvider: OAuth?, serializer: KSerializer<T>? = null, body: ByteArray? = null, contentType: String? = APPLICATION_JSON): HttpResponse<T> |
get |
fun <T : Any> HttpClient.get(url: String, authProvider: OAuth?, serializer: KSerializer<T>? = null, body: ByteArray? = null, contentType: String? = APPLICATION_JSON): HttpResponse<T> |
patch |
fun <T : Any> HttpClient.patch(url: String, authProvider: OAuth?, serializer: KSerializer<T>? = null, body: ByteArray? = null, contentType: String? = APPLICATION_JSON): HttpResponse<T> |
post |
fun <T : Any> HttpClient.post(url: String, authProvider: OAuth?, serializer: KSerializer<T>? = null, body: ByteArray? = null, contentType: String? = APPLICATION_JSON): HttpResponse<T> |
DeviceService |
DeviceService VenueNext class DeviceService : HttpClient |
EnvironmentService |
EnvironmentService VenueNext class EnvironmentService : HttpClient |
UserService |
UserService VenueNext class UserService : HttpClient |