wasn't able to find and I'm not sure if it possible at all. I know that I can pass the whole payload via @file.json, something like
$ curl -X POST -H "Content-Type: application/json" -d @test.json \
http://localhost/api/v3/endpoint
$ cat test.json
{
"key1": "value1",
"key2": "value2"
}
But now I need to upload gpg public key and I can't store the key inside test.json. What I need is something like
$ curl -X POST -H "Content-Type: application/json" \
http://localhost/api/v3/endpoint \
-d '{"key1": "value1", "key2": "@gpg-public.key"}'
Thanks in advance
As an option in bash I can use the following
$ curl -X POST -H "Content-Type: application/json" \
http://localhost/api/v3/endpoint \
-d "{\"key1\": \"value1\", \"key2\": \"$(cat gpg-public.key)\"}"
but I'm looking for more elegant way