494 B
494 B
title | date | tags | related | note | permalink | |||
---|---|---|---|---|---|---|---|---|
POSTing data from a JSON file | 2024-09-14 13:39:01 |
|
|
true | /notes/24-posting-data-from-a-json-file |
When sending JSON data in a POST request, instead of writing it inline with the
--data
or --json
option, a filename can be entered - prefixed with an @
symbol.
For example, to POST the data from a data.json file:
curl --insecure --json @data.json https://mysite.com/webhook