public interface HttpRequestMatchingFilter
HttpRequestMatchingFilter contains logic to deal with expected differences between 2 requests and brings them
in-line so that they can potentially match.
If we have a request that contains a http header entry that can differ from request to request, for example a user token,
the HttpRequestMatchingFilter can create copies of both input requests and remove the header entry of both or set
a common value so they can match.
Http Request Matching Filters can be chained. Each filter working on the output of the previous one. This is implemented
in AbstractHttpResponseProvider.AbstractHttpResponseProvider,
FileHttpResponseProvider,
AllExceptContentTypeHeaderFilter,
AllExceptOriginalHeadersFilter| Modifier and Type | Method and Description |
|---|---|
HttpRequestMatchingContext |
filter(HttpRequestMatchingContext context)
Filter/transform input http requests and response if needed.
|
HttpRequestMatchingFilter |
next()
Get next instance in chain.
|
void |
setNext(HttpRequestMatchingFilter filter)
Http request match filters can be chained. |
HttpRequestMatchingContext filter(HttpRequestMatchingContext context)
context - Input context. Contains either original request, non matching other request and original response OR
context modified by HttpRequestMatchingFilter earlier in the chain.void setNext(HttpRequestMatchingFilter filter)
Http request match filters can be chained.filter - Set next instance in chain.HttpRequestMatchingFilter next()
null.Copyright © 2014. All Rights Reserved.