Open
Description
For some reason, writing to influx by passing a variable as param to addField causes "Bad Request 400" error. I already attempted to use std::move the variables into the param but nothing seems to work apart from directly placing the values.
try
{
uint32_t online = 0;
uint32_t cached = 0;
influx->write(Point{"global_player_count"}
.addField("online", online)
.addField("cached", cached)
);
}
catch (InfluxDBException &e)
{
std::cout << e.what() << "\n";
}
EDIT: Finally solved it. After some digging realized how the Point::FieldValue variant does not take uint32_t as a type. A simple cast to unsigned int fixed it. Thanks!