#bin/sh app=$1 if [ $app == "basic" ] then curl --location --request POST $(cat infrastructure/cdk/target/output.json | jq -r '.UnicornStoreSpringApp.ApiEndpointBasic')'/unicorns' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "Something", "age": "Older", "type": "Animal", "size": "Very big" }' | jq exit 0 fi if [ $app == "spring" ] then curl --location --request POST $(cat infrastructure/cdk/target/output.json | jq -r '.UnicornStoreSpringApp.ApiEndpointSpring')'/unicorns' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "Something", "age": "Older", "type": "Animal", "size": "Very big" }' | jq exit 0 fi if [ $app == "micronaut" ] then curl --location --request POST $(cat infrastructure/cdk/target/output.json | jq -r '.UnicornStoreSpringApp.ApiEndpointMicronaut')'/unicorns' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "Something", "age": "Older", "type": "Animal", "size": "Very big" }' | jq exit 0 fi if [ $app == "spring-native-graalvm" ] then curl --location --request POST $(cat infrastructure/cdk/target/output.json | jq -r '.UnicornStoreSpringApp.ApiEndpointSpringNative')'/unicorns' \ --header 'Content-Type: application/json' \ --data-raw '{ "name": "Something", "age": "Older", "type": "Animal", "size": "Very big" }' | jq exit 0 fi