public class DefaultHttpResponseProvider extends AbstractHttpResponseProvider
HttpResponseProvider that supports http request with all properties. It supports any http header you define as
opposed to SimpleHttpResponseProvider which only supports Content-Type.| Constructor and Description |
|---|
DefaultHttpResponseProvider(boolean ignoreAdditionalHeaders)
Creates a new instance.
|
| Modifier and Type | Method and Description |
|---|---|
void |
reset()
Reset the response provider to its original state
|
void |
set(HttpRequest request,
HttpResponse response)
Sets a new request/response.
|
addExpected, addHttpRequestMatchingFilter, getResponse, lazyInitializeExpectedRequestsAndResponses, resetState, verifypublic DefaultHttpResponseProvider(boolean ignoreAdditionalHeaders)
ignoreAdditionalHeaders - In some cases you might want to ignore additional http headers and only want to check
some headers. For example sometimes a HTTP client adds custom identification headers you might not be
interested in. If this is the case and you don't necessary want a full match then specific
true. In case you specify false all http headers will be matched.public void set(HttpRequest request, HttpResponse response)
request - HttpRequest.response - Response that should be returned for given request.public void reset()
Copyright © 2014. All Rights Reserved.