org.mockserver.model.StringBody Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mockserver-core Show documentation
Show all versions of mockserver-core Show documentation
Functionality used by all MockServer modules for matching and expectations
package org.mockserver.model;
/**
* @author jamesdbloom
*/
public class StringBody extends Body {
private final String value;
public StringBody(String value, Type type) {
super(type);
this.value = value;
}
public static StringBody exact(String body) {
return new StringBody(body, Type.EXACT);
}
public static StringBody regex(String body) {
return new StringBody(body, Type.REGEX);
}
public static StringBody xpath(String body) {
return new StringBody(body, Type.XPATH);
}
public static StringBody json(String body) {
return new StringBody(body, Type.JSON);
}
public String getValue() {
return value;
}
@Override
public String toString() {
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy