body

Configures body matching through a dedicated BodySpecBuilder scope.

Groups all body-matching criteria — forms, multipart data, raw bytes, predicates, and future matchers — under a single block for better discoverability.

Example:

mokksy.post {
path("/upload")
body {
form {
field("locale", "test")
file("avatar") { filename { it?.contains("photo") == true } }
}
predicate { it?.status == "active" }
}
}

val body: MutableList<Matcher<P?>>(source)