influxdata / influxdb-client-dart

InfluxDB (v2+) Client Library for Dart and Flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

InfluxDB Client Invalid HTTP Header Type

ColbySawyer7 opened this issue · comments

Describe the bug
Flutter for Andriod development runs into fatal error when trying a basic query with this library. The error claims that the header Content-Type is invalid and is receiving a 400 error from the InfluxDB cloud server.

Expected behavior
Connect to InfluxDB cloud instance and spit out raw CSV as confirmation

Specifications:

  • Client Version: Flutter 3.3.9
  • InfluxDB Version: Latest Cloud
  • Platform: Windows/ Android Emulation

Additional context
Add any other context about the problem here.

Logs:
I/flutter ( 8049): << status: 204 - contentLength: null
I/flutter ( 8049): << headers: {connection: keep-alive, trace-id: 54aaa331a1e1f5eb, date: Fri, 03 Feb 2023 16:32:05 GMT, x-influxdb-request-id: 8413e2e10ff08cd9e4ad0505e922e23d, trace-sampled: false, x-influxdb-version: 2.0, strict-transport-security: max-age=15724800; includeSubDomains, x-influxdb-build: cloud2,Cloud}
I/flutter ( 8049): >> POST https://eastus-1.azure.cloud2.influxdata.com/api/v2/query?org=popoviciu18%40ecu.edu =====
I/flutter ( 8049): >> headers: {Authorization: Token REDACTED_TOKEN, User-Agent: influxdb-client-dart/2.8.0, content-type: text/plain; charset=utf-8}
I/flutter ( 8049): >> contentLength: 364
I/flutter ( 8049): << status: 400 - contentLength: 77
I/flutter ( 8049): << headers: {connection: keep-alive, trace-id: fc6f0c43970577b7, date: Fri, 03 Feb 2023 16:32:06 GMT, x-influxdb-request-id: a495f719bbbfffb3588c8d507f663ed0, trace-sampled: false, vary: Accept-Encoding, strict-transport-security: max-age=15724800; includeSubDomains, content-length: 77, content-type: application/json; charset=utf-8, x-platform-error-code: invalid, x-influxdb-build: Cloud}

Flutter Debug (VSCode):
image