When a response for a request arrives, is there any way to read the response headers?
The response event handlers gets passed the <iron-request>
as the second argument. <iron-request>
has an xhr
property that is the XMLHttpRequest
used to make the request. You should be able to get the response headers from that.
<iron-ajax on-response="ajaxResponse"></iron-ajax>
...
ajaxResponse: function(e, request) {
var headers = request.xhr.getAllResponseHeaders();
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With