HttpClient

object HttpClient

Types

Link copied to clipboard
data class Response(val statusCode: Int, val body: ByteArray)

Functions

Link copied to clipboard
fun <T : Any> decodeFromStringWithClass(string: String, kClass: KClass<T>): T
Link copied to clipboard
inline suspend fun <T> delete(url: String, headers: Map<String, String> = emptyMap(), body: T): HttpClient.Response
Link copied to clipboard
suspend fun get(url: String, headers: Map<String, String> = emptyMap()): HttpClient.Response
Link copied to clipboard
inline suspend fun <T> patch(url: String, headers: Map<String, String> = emptyMap(), body: T): HttpClient.Response
Link copied to clipboard
inline suspend fun <T> post(url: String, headers: Map<String, String> = emptyMap(), body: T): HttpClient.Response
Link copied to clipboard
suspend fun postMultipart(url: String, headers: Map<String, String> = emptyMap(), fileName: String, fileData: ByteArray, mimeType: String): HttpClient.Response