com.github.kristofa.test.http
Class DefaultHttpResponseProvider
java.lang.Object
com.github.kristofa.test.http.AbstractHttpResponseProvider
com.github.kristofa.test.http.DefaultHttpResponseProvider
- All Implemented Interfaces:
- HttpResponseProvider
public class DefaultHttpResponseProvider
- extends AbstractHttpResponseProvider
A HttpResponseProvider that supports http request with all properties. It supports any http header you define as
opposed to SimpleHttpResponseProvider which only supports Content-Type.
- Author:
- kristof
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultHttpResponseProvider
public DefaultHttpResponseProvider(boolean ignoreAdditionalHeaders)
- Creates a new instance.
- Parameters:
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.
set
public void set(HttpRequest request,
HttpResponse response)
- Sets a new request/response.
- Parameters:
request - HttpRequest.response - Response that should be returned for given request.
Copyright © 2014. All Rights Reserved.