kgaigl
Jan 20, 2021Cirrocumulus
HTTPS Monitor: JSON File behind login page
Hello,
we've already a https monitor that reads the contents of a json file, it looks like this:
send string: GET /intern/api/v1/health/portal-status HTTP/1.1\r\nHost: host.company.com\r\n\r\n
receive strimg: \"portalStatus\":\"AVAILABLE\"
this works fine.
but now I need a similar monitor, but the json file is passwort protectet, when I add username/password to the monitor, it doesn't work.
when I do a curl:
curl -sku monitor:<pw> -H "Content-Type: application/json" -X GET https://host.company.int/monitor/wga/widgets/health.json
I get the logon-page for the username/pw
I tried some other parameter for curl, but I don't get the content of the json-file.
Any ideas?
thanks in advance