I have a folder of 100 json files that I need to upload to an endpoint. The request code looks like this:
curl --location --request POST 'https://mywebsite.com/upload'
--header 'Authorization: Basic clkwen3n2,mn4mns'
--header 'Content-Type: application/json'
--header 'Cookie: __cfduid=d798234312e4df616eb234598839773'
--data-raw '{"user": "me", "id": "38482", "status": "active"}'
But instead of copy pasting the JSON from each of the 100 files into the raw tab of the request and sending, I was hoping there was a programatic way to iterate through all 100 files, set the body dynamically to the contents of the json file and post it.
How can I achieve this?