|
|
fun asHtml(response: HttpResponse): Document
fun asHtml(htmlString: String): Document |
|
|
fun asJson(response: HttpResponse): DocumentContext
fun asJson(jsonString: String): DocumentContext |
|
|
fun <T : Any> asObjectFromJson(response: HttpResponse): T
fun <T> asObjectFromJson(response: HttpResponse, clazz: Class<T>): T |
|
|
fun asStream(response: HttpResponse): InputStream |
|
|
fun asString(response: HttpResponse): String |
|
|
fun asXml(response: HttpResponse): Document
fun asXml(xmlString: String): Document |
|
|
Fix for HttpClient's: 'escaped absolute path not valid'
https://stackoverflow.com/questions/13652681/httpclient-invalid-uri-escaped-absolute-path-not-valid
open fun baseUrl(uri: String): String |
|
|
fun checkHtml(response: HttpResponse, validator: Document.() -> Boolean): Unit |
|
|
fun checkStatus(response: HttpResponse, statusCodes: IntRange = STATUS_CODE_VALID): Unit
fun checkStatus(response: HttpResponse, statusCode: Int): Unit
fun checkStatus(response: HttpResponse, statusCodes: List<Int>): Unit |
|
|
fun checkText(response: HttpResponse, containedText: String, ignoreCase: Boolean = true): Unit |
|
|
fun clientBuilder(builder: HttpClientBuilder.() -> Unit): Unit |
|
|
open fun createEntityMultipart(params: Map<String, Any?>): HttpEntity |
|
|
open fun createEntityUrlencoded(params: Map<String, Any?>): HttpEntity |
|
|
fun delete(uri: String): Unit
fun <T> delete(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> delete(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpDelete.() -> Unit): T |
|
|
fun download(fileUrl: String): File
fun download(fileUrl: String, target: File): Unit |
|
|
fun downloadTo(fileUrl: String, dir: File): File |
|
|
open fun <T> execute(method: HttpRequestBase, handler: HttpClient.(HttpResponse) -> T): T
fun execute(method: HttpRequestBase): Unit |
|
|
fun get(uri: String): Unit
fun <T> get(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> get(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpGet.() -> Unit): T |
|
|
fun head(uri: String): Unit
fun <T> head(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> head(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpHead.() -> Unit): T |
|
|
fun patch(path: String): Unit
fun <T> patch(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> patch(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPatch.() -> Unit): T |
|
|
fun post(url: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> post(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T
fun <T> post(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> post(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPost.() -> Unit): T |
|
|
fun postMultipart(uri: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> postMultipart(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T |
|
|
fun postUrlencoded(uri: String, params: Map<String, Any?> = mapOf()): Unit
fun <T> postUrlencoded(uri: String, params: Map<String, Any?> = mapOf(), handler: HttpClient.(HttpResponse) -> T): T |
|
|
fun put(uri: String): Unit
fun <T> put(uri: String, handler: HttpClient.(HttpResponse) -> T): T
fun <T> put(uri: String, handler: HttpClient.(HttpResponse) -> T, options: HttpPut.() -> Unit): T |
|
|
fun <T> request(method: String, uri: String, handler: HttpClient.(HttpResponse) -> T): T |
|
|
fun requestConfigurer(configurer: HttpRequestBase.() -> Unit): Unit |
|
|
fun responseChecker(checker: (HttpResponse) -> Unit): Unit |
|
|
fun responseHandler(handler: (HttpResponse) -> Unit): Unit |
|
|
open fun throwStatusException(response: HttpResponse): Unit |
|
|
fun HttpClientBuilder.useDefaults(): Unit |