July 2019
Beginner to intermediate
350 pages
8h 13m
English
In this section, we will be using the following URL: https://api.sunrise-sunset.org/json?lat=27.717245&lng=85.323959&date=2019-03-04.
Let's process a request through a simple API in order to obtain the sunrise and sunset timings (available in UTC) for Kathmandu, Nepal. Query strings require values for lat (latitude), lng (longitude), and date for the chosen location. As we can see in the following screenshot, the response that we obtained is in JSON format (formatted using a browser extension), and its a successful request was verified by using a browser-based developer tool with Request Method and HTTP Status Code (200, that is, OK or Success):
Read now
Unlock full access