Headers passed into the core-ajax element are being set as the prototype properties with Object.create(...).
get requestHeaders() {
var headers = Object.create(this.headers || {});
if (!('content-type' in headers)) {
headers['content-type'] = this.contentType;
}
return headers;
},
Then in core-request, those headers aren't surfacing as part of the xhr.setRequestHeader...
It seems like a good fix would be getPrototypeOf before inspecting and setting the content-type key. I've tested this and the result is a fully populated headers object that core-request handles properly.
get requestHeaders() {
var headers = Object.create(this.headers || {});
headers = Object.getPrototypeOf(headers);
if (!('content-type' in headers)) {
headers['content-type'] = this.contentType;
}
return headers;
},
Headers passed into the core-ajax element are being set as the prototype properties with Object.create(...).
Then in core-request, those headers aren't surfacing as part of the xhr.setRequestHeader...
It seems like a good fix would be getPrototypeOf before inspecting and setting the content-type key. I've tested this and the result is a fully populated headers object that core-request handles properly.