$ curl -X POST \
-H 'authorization: Bearer <your-jwt-token>' \
-H 'content-type: application/json' \
-H 'cache-control: no-cache' \
--data '{"binary_data": "aGVsbG8K"}' \
'https://cloudiotdevice.googleapis.com/v1/projects/<your-project-id>/locations/<region-name>/registries/iotcore-registry/devices/<device-name>:publishEvent'
{}
Can anyone share a few code snippets as of how to send POST requests including a JWT bearer token for authorization in the header of the POST request?
Thanks