Post JSON to an API with curl
Increasingly this is becoming just a place to store snippets and one-liners that are a bit too long to remember.
curl "https://my-api/endpoint" \ -X POST \ -H "Accept: application/json" \ -H "Authorization: f00ba2" \ --data '{"my": "payload", "foo": "bar"}' \ --include