#!/usr/bin/env bash set -euo pipefail SERVICE_URL="${SERVICE_URL:-http://127.0.0.1:8080}" INBOX_SECRET="${INBOX_SECRET:-change-me}" echo "POST ${SERVICE_URL}/share" curl --fail --silent --show-error \ -X POST "${SERVICE_URL}/share" \ -H "Content-Type: application/json" \ -H "X-Inbox-Secret: ${INBOX_SECRET}" \ -d '{"type":"url","content":"https://example.com"}' echo echo "GET ${SERVICE_URL}/inbox?limit=5" curl --fail --silent --show-error \ "${SERVICE_URL}/inbox?limit=5" echo