lander/landerctl
Jef Roosens 94f7400169
Some checks failed
ci/woodpecker/push/woodpecker Pipeline failed
Added a readme
2022-11-16 13:05:09 +01:00

16 lines
286 B
Bash
Executable file

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