When setting up GCP uptime monitoring through the console with the following settings, I am getting a Request Exception in 10,000 ms
error response. The documentation mentions "encode URL yourself" on the body section, which I presume is a standard URL encode.
General
Request Method : POST
Body : %7B%20%22query%22%3A%20%22query%20%7B%20__typename%20%7D%22%20%7D
Host Header : application/x-www-form-urlencoded
Port : 443
Custom Headers
Header : Authorization
Value : Basic <hash token>
The equivalent via curl
which works would be as the following example.
curl -X POST https://api.mytest.com \
-H 'Content-Type: application/x-www-form-urlencoded' \
-H 'Authorization: Basic <hash token>' \
-d '{"query": "query { __typename }" }'
The body section on explaining is cryptic as how the expected contents should be like. I am wondering if anyone did get an example of POST data working nicely with uptime?