Java Body Spec Builder
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)));Content copied to clipboard
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
fun multipart(contentType: String, configurer: Consumer<JavaMultipartSpecBuilder>): JavaBodySpecBuilder<P>
Matches a multipart body with the expected content type, such as multipart/mixed.
Link copied to clipboard
Matches the raw request body text exactly.
Link copied to clipboard
Matches the raw request body text using a predicate.