org.http4k.strikt.request.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of http4k-testing-strikt Show documentation
Show all versions of http4k-testing-strikt Show documentation
A set of Strikt matchers for common http4k types
package org.http4k.strikt
import org.http4k.core.Request
import org.http4k.core.body.form
import org.http4k.core.cookie.cookie
import org.http4k.lens.Lens
import org.http4k.lens.QueryLens
import org.http4k.lens.WebForm
import strikt.api.Assertion
val Assertion.Builder.uri get() = get(Request::uri)
val Assertion.Builder.method get() = get(Request::method)
fun Assertion.Builder.query(lens: QueryLens) = get { lens(this) }
fun Assertion.Builder.query(name: String) = get { query(name) }
fun Assertion.Builder.queries(name: String) = get { queries(name) }
fun Assertion.Builder.form(name: String) = get { form(name) }
fun Assertion.Builder.cookie(name: String) = get { cookie(name) }
fun Assertion.Builder.field2(lens: Lens) = get { lens(this) }
© 2015 - 2025 Weber Informatics LLC | Privacy Policy