#!/bin/bash
echo "=== cors_proxy_get full response (headers+body) to public URL ==="
curl -sk -u 'john:Ip7*sunfO0#P5xxg' 'https://127.0.0.1:2087/json-api/cors_proxy_get?api.version=1&url=https://example.com/' -D - | head -c 600
echo
echo "=== does it return body content? ==="
curl -sk -u 'john:Ip7*sunfO0#P5xxg' 'https://127.0.0.1:2087/json-api/cors_proxy_get?api.version=1&url=https://example.com/' | python3 -c "import sys,json; d=json.load(sys.stdin); print('KEYS:',list(d.keys())); print('data:',str(d.get('data',''))[:300])" 2>&1 | head
