#!/usr/bin/env sh
set -eu

ENDPOINTS="
https://adn.producaorestrita.nfse.gov.br/municipios/docs/index.html
https://adn.producaorestrita.nfse.gov.br/contribuintes/docs/index.html
https://adn.producaorestrita.nfse.gov.br/docs/index.html
https://adn.producaorestrita.nfse.gov.br/parametrizacao/docs/index.html
https://adn.producaorestrita.nfse.gov.br/danfse/docs/index.html
https://sefin.producaorestrita.nfse.gov.br/API/SefinNacional/docs/index
"

for url in $ENDPOINTS; do
  code=$(curl --silent --show-error --output /dev/null --write-out "%{http_code}" --max-time 20 "$url" || true)
  printf '%s %s\n' "$code" "$url"
done

cat <<INFO

Interpretacao esperada:
  496 geralmente indica que o servidor exigiu certificado cliente.
  2xx/3xx indica endpoint publico ou acessivel sem certificado.
  000 indica falha de rede/DNS/TLS antes da resposta HTTP.

INFO
