org.http4k.hamkrest.httpTransaction.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http4k-testing-hamkrest Show documentation
Show all versions of http4k-testing-hamkrest Show documentation
A set of Hamkrest matchers for common http4k types
package org.http4k.hamkrest
import com.natpryce.hamkrest.Matcher
import com.natpryce.hamkrest.has
import org.http4k.core.HttpTransaction
import org.http4k.core.Request
import org.http4k.core.Response
fun hasRequest(matcher: Matcher) = has("Request", { tx: HttpTransaction -> tx.request }, matcher)
fun hasResponse(matcher: Matcher) = has("Response", { tx: HttpTransaction -> tx.response }, matcher)