lander/landerctl
Jef Roosens 494946d24a
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
feat: use more std::string
2022-11-21 14:19:56 +01:00

15 lines
271 B
Bash
Executable file

#!/usr/bin/env sh
API_KEY=test
URL=http://localhost:18080
if [ "$1" = add ]; then
curl \
-XPOST \
-d "$2" \
-H "X-Api-Key: $API_KEY" \
"$URL/$3"
elif [ "$1" = get ]; then
curl -is "$URL/$2" | sed -En 's/^location: (.*)/\1/p'
fi