Class FieldMatcher
java.lang.Object
kong.unirest.core.FieldMatcher
- All Implemented Interfaces:
BodyMatcher
Matches simple form fields
-
Constructor Summary
ConstructorsConstructorDescriptionFieldMatcher(Map<String, String> formParams) Creates a FieldMatcher expecting a map of keys and values -
Method Summary
Modifier and TypeMethodDescriptionindicates if the Matcher succeeded in matching the bodystatic FieldMatcherCreates a FieldMatcher expecting a map of keys and values use like: FieldMatcher.of("fruit", "orange", "quantity" "42")
-
Constructor Details
-
FieldMatcher
-
-
Method Details
-
of
Creates a FieldMatcher expecting a map of keys and values use like: FieldMatcher.of("fruit", "orange", "quantity" "42")- Parameters:
keyValuePairs- an array of key-value pairs to expect- Returns:
- a new FieldMatcher
-
matches
Description copied from interface:BodyMatcherindicates if the Matcher succeeded in matching the body- Specified by:
matchesin interfaceBodyMatcher- Parameters:
body- the list of body parts- Returns:
- MatchStatus indicating if the Matcher succeeded in matching the body
- Throws:
AssertionError
-