Skip to content

Instantly share code, notes, and snippets.

@jonheslop
Created November 22, 2019 15:17
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save jonheslop/e9a1d866b1bf8e20ac3b1062e2491f2a to your computer and use it in GitHub Desktop.
#!/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