influxdata / docs-v2

InfluxData Documentation that covers InfluxDB Cloud, InfluxDB OSS 2.x, InfluxDB OSS 1.x, InfluxDB Enterprise, Telegraf, Chronograf, Kapacitor, and Flux.
https://docs.influxdata.com
MIT License
69 stars 260 forks source link

fix broken curl post commands #5423

Closed Abdullahsab3 closed 3 months ago

Abdullahsab3 commented 3 months ago

Closes #

Describe your proposed changes here.

The documentations uses the following command for POST requests using curl:

curl --post 'https://cluster-id.influxdb.io/api/v2/write?bucket=DATABASE_NAME&precision=s' \
  --header 'Authorization: Bearer DATABASE_TOKEN' \
  --data-binary 'home,room=kitchen temp=72 1463683075'

However this command returns an error:

curl: option --post: is ambiguous
curl: try 'curl --help' or 'curl --manual' for more information

My changes propose using the correct interface for curl, which is providing the request type using the --request flag