Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public final class RequestMatchers
- Object
- RequestMatchers
Combines matchers: all of them, any of them, or not one.
RequestMatcher writes = RequestMatchers.allOf(
AntPathRequestMatcher.antMatcher("/api/**"),
RequestMatchers.not(RequestMatchers.method("GET")));
Methods
public static RequestMatcher anyOf(RequestMatcher... matchers) | Matches when any of matchers does; never, given none. |
public static RequestMatcher allOf(RequestMatcher... matchers) | Matches when every one of matchers does; always, given none. |
public static RequestMatcher not(RequestMatcher matcher) | Matches when matcher does not. |
public static RequestMatcher method(String method) | Matches requests of one method, written as HTTP writes it: DELETE. |
public static RequestMatcher header(String name, String value) | Matches requests carrying a header; with a value given, that value. |
Inherited methods
Method details
anyOf
public static RequestMatcher anyOf(RequestMatcher... matchers)Matches when any of
matchers does; never, given none.allOf
public static RequestMatcher allOf(RequestMatcher... matchers)Matches when every one of
matchers does; always, given none.not
public static RequestMatcher not(RequestMatcher matcher)Matches when
matcher does not.method
public static RequestMatcher method(String method)Matches requests of one method, written as HTTP writes it:
DELETE.header
public static RequestMatcher header(String name, String value)Matches requests carrying a header; with a value given, that value.