JavaBodySpecBuilder

Java-friendly body block equivalent.

Example:

mokksy.post(spec -> spec.body(body -> body
.form(form -> form.field("user", "alice"))
.bytesMatches(bytes -> bytes != null && bytes.length > 0)));

Functions

Link copied to clipboard

Matches the raw request body bytes exactly.

Link copied to clipboard

Matches the raw request body bytes using a predicate.

Link copied to clipboard

Requires the request body content type to equal contentType.

Link copied to clipboard

Matches either URL-encoded form data or multipart form data.

Matches form data with an explicit accepted encoding.

Link copied to clipboard

Matches a multipart body with the expected content type, such as multipart/mixed.

Link copied to clipboard

Adds a predicate for the deserialized request body.

Link copied to clipboard

Matches the raw request body text exactly.

Link copied to clipboard

Matches the raw request body text using a predicate.