// query last month's data
var start = new Date();
start.setMonth(start.getMonth() - 1);
start.setDate(1);
var end = new Date();
var query = {cache_time: 0, start: start.getTime(), end: end.getTime()};
event.detail.request.set('body', query);
event.detail.options.body = query;
}`
Actual outcome
neither of the above setters will have any effect on the request body
Description
Unable to modify request body before it is sent to server side (
on-request
event ):<iron-ajax id="datapointRequest" url="/xxx/v1/datapoints" method="post" on-request="_timeseriesQuery" on-response="_initChartData"></iron-ajax>
` _timeseriesQuery: function (event) {
Actual outcome
neither of the above setters will have any effect on the request body