public class HttpRequestConsumersMatcher extends AbstractHttpRequestMatcher
HttpRequest 'Content-Type' header matcher.| Constructor and Description |
|---|
HttpRequestConsumersMatcher(String... consumes)
Creates a new instance from 0 or more "consumes" expressions.
|
HttpRequestConsumersMatcher(String[] consumes,
String[] headers)
Creates a new instance with "consumes" and "header" expressions.
|
| Modifier and Type | Method and Description |
|---|---|
protected Collection<com.alibaba.cloud.dubbo.http.matcher.ConsumeMediaTypeExpression> |
getContent()
Return the discrete items a request condition is composed of.
|
protected String |
getToStringInfix()
The notation to use when printing discrete items of content.
|
boolean |
match(org.springframework.http.HttpRequest request)
Match
HttpRequest or not. |
equals, hashCode, toStringpublic HttpRequestConsumersMatcher(String... consumes)
consumes - consumes expressions if 0 expressions are provided, the condition
will match to every requestpublic HttpRequestConsumersMatcher(String[] consumes, String[] headers)
consumes - consumes expressionsheaders - headers expressionspublic boolean match(org.springframework.http.HttpRequest request)
HttpRequestMatcherHttpRequest or not.request - The HttpRequest instance.true, or false.protected Collection<com.alibaba.cloud.dubbo.http.matcher.ConsumeMediaTypeExpression> getContent()
AbstractHttpRequestMatcherFor example URL patterns, HTTP request methods, param expressions, etc.
getContent in class AbstractHttpRequestMatchernullprotected String getToStringInfix()
AbstractHttpRequestMatcher
For example " || " for URL patterns or " && " for param
expressions.
getToStringInfix in class AbstractHttpRequestMatcherCopyright © 2021 Pivotal Software, Inc.. All rights reserved.