mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2024-11-23 20:37:12 +01:00
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:
parent
e7bf36f0b6
commit
4e56b4eb36
@ -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>
|
||||||
|
Loading…
Reference in New Issue
Block a user