#!/bin/bash host="${STRAWBOSS_HOST:-localhost:8180}" if [ $# -eq 1 ]; then url="$1" method="GET" data="" elif [ $# -eq 2 ]; then method="$1" url="$2" data="" else method="$1" url="$2" data="$3" fi curl -X "$method" -H "Authorization: Bearer $(cat token.txt)" "http://${host}/api/$url" -d "$data" echo "" #echo "curl -X \"$method\" -H \"Authorization: Bearer $(cat token.txt)\" \"localhost:8180/api/$url\" | jq . "