Skip to content

Instantly share code, notes, and snippets.

@jonheslop
Created Nov 22, 2019
Embed
What would you like to do?
#!/bin/bash
# declare an array called array and define 3 vales
array=( '{"name":"Bohemia Divide","year":2018}' '{"name":"Colorado Trail Race (CTR)","year":2019}' )
for i in "${array[@]}"
do
echo $i
curl --request POST \
--url http://localhost:3000/api/create-race \
--header 'content-type: application/json' \
--data $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment