influxdb-client-java
influxdb-client-java copied to clipboard
`InfluxQLQueryService` should use the `application/json` accept HTTP header to ensure that field results are mapped to the correct types
trafficstars
Proposal: InfluxQLQueryService should use json accept header to retain series points values original types. Current behavior: Current is 'application/csv', all values are read as string.
@Headers({ "Accept:application/csv", "Content-Type:application/vnd.influxql" })
@POST("query")
Call<ResponseBody> query(
@Body String query,
@Nonnull @Query("db") String db,
@Query("rp") String retentionPolicy,
@Query("epoch") String epoch,
@Header("Zap-Trace-Span") String zapTraceSpan
);
Use case: Why is this important (helps with prioritizing requests)?
API: https://docs.influxdata.com/influxdb/v2/api/v1-compatibility/#operation/PostQueryV1