MartinSpamer
13 years agoFrequent Contributor
Response Headers error
If you retrieve HTTP response headers by name they are incorrectly enclosed in square brackets even though they are strings not lists/arrays. e.g. log.info messageExchange.responseHeaders["Se...
- 10 years ago
That is because, type is ArrayList ([] denotes a list), not String.
Since it has one element in the list, 0th one should match.
Below should work:
assert messageExchange.responseHeaders["Content-Type"][0] == 'image/jpeg'