docs/url-examples.md: add missing Content-Type: application/json header in curl examples for json data ingestion

If the `Content-Type: application/json` request header isn't set,
then the server can improperly consume the request body when parsing request parameters
This commit is contained in:
Aliaksandr Valialkin 2023-06-20 21:04:17 -07:00
parent e7bf36f0b6
commit 4e56b4eb36
No known key found for this signature in database
GPG Key ID: A72BEC6CD3D0DED1

View File

@ -174,7 +174,7 @@ Single-node VictoriaMetrics:
<div class="with-copy" markdown="1"> <div class="with-copy" markdown="1">
```console ```console
curl --data-binary "@filename.json" -X POST http://localhost:8428/api/v1/import curl -H 'Content-Type: application/json' --data-binary "@filename.json" -X POST http://localhost:8428/api/v1/import
``` ```
</div> </div>
@ -183,7 +183,7 @@ Cluster version of VictoriaMetrics:
<div class="with-copy" markdown="1"> <div class="with-copy" markdown="1">
```console ```console
curl --data-binary "@filename.json" -X POST http://<vminsert>:8480/insert/0/prometheus/api/v1/import curl -H 'Content-Type: application/json' --data-binary "@filename.json" -X POST http://<vminsert>:8480/insert/0/prometheus/api/v1/import
``` ```
</div> </div>
@ -497,7 +497,7 @@ echo '
} }
] ]
} }
' | curl -X POST --data-binary @- http://localhost:8428/datadog/api/v1/series ' | curl -X POST -H 'Content-Type: application/json' --data-binary @- http://localhost:8428/datadog/api/v1/series
``` ```
</div> </div>
@ -524,7 +524,7 @@ echo '
} }
] ]
} }
' | curl -X POST --data-binary @- 'http://<vminsert>:8480/insert/0/datadog/api/v1/series' ' | curl -X POST -H 'Content-Type: application/json' --data-binary @- 'http://<vminsert>:8480/insert/0/datadog/api/v1/series'
``` ```
</div> </div>