Created
November 22, 2019 15:17
Star
You must be signed in to star a gist
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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