public class HeaderExtractor extends java.lang.Object implements HttpResponseAccessor
If header is repeated multiple times in the HTTP response, all the values will be captured.
| Constructor and Description |
|---|
HeaderExtractor(java.lang.String headerName)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
access(HttpResponse response)
Processes the raw HTTP response.
|
java.util.List<java.lang.String> |
getHeaderValues()
Returns the captured HTTP header values.
|
public HeaderExtractor(java.lang.String headerName)
headerName - name of the header to be extracted; must not be
null.public void access(HttpResponse response)
HttpResponseAccessorIf the implementation of this method throws a RuntimeException
it will be logged and ignored, i.e. it cannot fail the response
processing.
access in interface HttpResponseAccessorresponse - representing the raw REST/HTTP responsepublic java.util.List<java.lang.String> getHeaderValues()