Types

Link copied to clipboard
object Companion
Link copied to clipboard
data class CompletedResponse<T>(val status: Int, val statusText: String, val headers: Http.Headers, val content: T)
Link copied to clipboard
data class RequestConfig(    val followRedirects: Boolean = true,     val throwErrors: Boolean = false,     val maxRedirects: Int = 10,     val referer: String? = null,     val simulateBrowser: Boolean = false)
Link copied to clipboard
data class Response(    val status: Int,     val statusText: String,     val headers: Http.Headers,     val rawContent: AsyncInputStream,     val content: AsyncInputStream)

Properties

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
suspend fun post(    url: String,     data: HttpBodyContent,     headers: Http.Headers = Http.Headers(),     config: HttpClient.RequestConfig = RequestConfig.DEFAULT): HttpClient.Response
Link copied to clipboard
suspend fun readBytes(url: String, config: HttpClient.RequestConfig = RequestConfig()): ByteArray
Link copied to clipboard
suspend fun readJson(url: String, config: HttpClient.RequestConfig = RequestConfig()): Any?
Link copied to clipboard
suspend fun readString(url: String, config: HttpClient.RequestConfig = RequestConfig()): String
Link copied to clipboard
suspend fun request(    method: Http.Method,     url: String,     headers: Http.Headers = Http.Headers(),     content: AsyncInputStreamWithLength? = null,     config: HttpClient.RequestConfig = RequestConfig.DEFAULT): HttpClient.Response
suspend fun request(    method: Http.Method,     url: String,     data: HttpBodyContent,     headers: Http.Headers = Http.Headers(),     config: HttpClient.RequestConfig = RequestConfig.DEFAULT): HttpClient.Response
Link copied to clipboard
suspend fun requestAsBytes(    method: Http.Method,     url: String,     headers: Http.Headers = Http.Headers(),     content: AsyncStream? = null,     config: HttpClient.RequestConfig = RequestConfig()): HttpClient.CompletedResponse<ByteArray>
Link copied to clipboard
suspend fun requestAsString(    method: Http.Method,     url: String,     headers: Http.Headers = Http.Headers(),     content: AsyncStream? = null,     config: HttpClient.RequestConfig = RequestConfig()): HttpClient.CompletedResponse<String>
Link copied to clipboard