Reputation: 1462
HTTPResponse.getHeaders() returns a key-value map. The problem is when there are multiple headers with the same name (e.g. there is often multiple 'set-cookie' headers), as you only get access to the one defined last.
How do I access all the headers of the same name?
Upvotes: 1
Views: 1231
Reputation: 7858
Try getAllHeaders()
which returns an array of values for each key instead (precisely for this reason).
Upvotes: 2