HttpClientTool

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

Constructors

Link copied to clipboard
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)
constructor(adapter: HttpClientPort, url: String? = null, mediaType: MediaType, accept: List<MediaType> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), sslSettings: SslSettings? = SslSettings(), handler: HttpHandler? = serializeHandler)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
val body: Any
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val status: Int

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(status: Int)
Link copied to clipboard
Link copied to clipboard
fun delete(path: String = "/", body: Any = "", formParameters: List<HttpField> = 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, pathParameters: Map<String, Any>, body: Any = "", formParameters: List<HttpField> = 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: String = "/", body: Any = "", formParameters: List<HttpField> = 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, pathParameters: Map<String, Any>, body: Any = "", formParameters: List<HttpField> = 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: String = "/", body: Any = "", formParameters: List<HttpField> = 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, pathParameters: Map<String, Any>, body: Any = "", formParameters: List<HttpField> = 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: String = "/", body: Any = "", formParameters: List<HttpField> = 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, pathParameters: Map<String, Any>, body: Any = "", formParameters: List<HttpField> = 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: String = "/", body: Any = "", formParameters: List<HttpField> = 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<HttpField> = 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, pathParameters: Map<String, Any>, body: Any = "", formParameters: List<HttpField> = 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, pathParameters: Map<String, Any>, formParameters: List<HttpField> = 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: String = "/", body: Any = "", formParameters: List<HttpField> = 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<HttpField> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept, body: () -> Any): HttpResponsePort
fun put(path: String, pathParameters: Map<String, Any>, formParameters: List<HttpField> = emptyList(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept, body: () -> Any): HttpResponsePort
fun put(path: String, pathParameters: Map<String, Any>, body: Any = "", formParameters: List<HttpField> = 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 request(block: HttpClientTool.() -> Unit)
Link copied to clipboard
fun start()
Link copied to clipboard
fun stop()
Link copied to clipboard
fun trace(path: String = "/", body: Any = "", formParameters: List<HttpField> = 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, pathParameters: Map<String, Any>, body: Any = "", formParameters: List<HttpField> = emptyList(), headers: Map<String, *> = emptyMap<String, Any>(), parts: List<HttpPart> = emptyList(), contentType: ContentType? = settings.contentType, accept: List<ContentType> = settings.accept): HttpResponsePort