#!/bin/bash endpoint="/query" URL="https://jpappel.xyz/toggle$endpoint" [ "$2" == "localhost" ] && URL="localhost:9090$endpoint" jq . "$1" | curl -s "$URL" \ --header "Content-Type: application/json" \ --request POST \ -d @- | jq .