HttpClientTool

data class HttpClientTool(val adapter: HttpClientPort, val url: String? = null, val httpContentType: ContentType? = null, val httpAccept: List<ContentType> = emptyList(), val httpHeaders: Map<String, *> = emptyMap<String, Any>(), val sslSettings: SslSettings? = SslSettings(), val handler: HttpHandler? = serializeHandler, val authorization: Authorization? = null, val followRedirects: Boolean = false)

Constructors

Link copied to clipboard
constructor(adapter: HttpClientPort, url: String? = null, mediaType: MediaType, accept: List<MediaType> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), sslSettings: SslSettings? = SslSettings(), handler: HttpHandler? = serializeHandler)
constructor(adapter: HttpClientPort, url: String? = null, httpContentType: ContentType? = null, httpAccept: List<ContentType> = emptyList(), httpHeaders: Map<String, *> = emptyMap<String, Any>(), sslSettings: SslSettings? = SslSettings(), handler: HttpHandler? = serializeHandler, authorization: Authorization? = null, followRedirects: Boolean = false)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
val attributes: Map<String, *>
Link copied to clipboard
Link copied to clipboard
val body: Any
Link copied to clipboard
Link copied to clipboard
val cookies: Map<String, Cookie>
Link copied to clipboard
val followRedirects: Boolean = false
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val httpHeaders: Map<String, *>
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val url: String? = null

Functions

Link copied to clipboard
fun assertBody(body: Any)
Link copied to clipboard
fun assertBodyContains(vararg texts: String)
Link copied to clipboard
fun assertContentType(contentType: ContentType)
Link copied to clipboard
fun assertOk()
Link copied to clipboard
fun assertStatus(statusType: HttpStatusType)
Link copied to clipboard
Link copied to clipboard
fun delete(path: Pair<String, Map<String, Any>>, body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun delete(path: String = "/", body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
Link copied to clipboard
fun get(path: Pair<String, Map<String, Any>>, body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun get(path: String = "/", body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
Link copied to clipboard
fun options(path: Pair<String, Map<String, Any>>, body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun options(path: String = "/", body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
Link copied to clipboard
fun patch(path: Pair<String, Map<String, Any>>, body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun patch(path: String = "/", body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
Link copied to clipboard
fun post(path: Pair<String, Map<String, Any>>, body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun post(path: Pair<String, Map<String, Any>>, formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept, body: () -> Any): HttpResponsePort
fun post(path: String = "/", body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun post(path: String = "/", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept, body: () -> Any): HttpResponsePort
Link copied to clipboard
fun put(path: Pair<String, Map<String, Any>>, formParameters: List<FormParameter> = emptyList(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept, body: () -> Any): HttpResponsePort
fun put(path: Pair<String, Map<String, Any>>, body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun put(path: String = "/", body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun put(path: String = "/", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept, body: () -> Any): HttpResponsePort
Link copied to clipboard
fun request(block: HttpClientTool.() -> Unit)
Link copied to clipboard
fun start()
Link copied to clipboard
fun stop()
Link copied to clipboard
fun trace(path: Pair<String, Map<String, Any>>, body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort
fun trace(path: String = "/", body: Any = "", formParameters: List<FormParameter> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort