influxdb-client-java icon indicating copy to clipboard operation
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

Open j3r0lin opened this issue 1 year ago • 3 comments
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

j3r0lin avatar May 24 '24 04:05 j3r0lin