Look at the source, this is an example of using HTTP Get with params
This is the one example you will see using XmlHTTPRequest, all others & new code should use the Fetch API
this code uses an anon func to read the response request.onreadystatechange = function()
This example using the Fetch API is in
sunrise
Where do you want to know about sunset/sunrise
Latitude
Longitude