Skip to content

InfluxQLQueryService should use the application/json accept HTTP header to ensure that field results are mapped to the correct types #719

@j3r0lin

Description

@j3r0lin

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

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions