I am getting a 200 code from fetching the url but I cant figure out how to add the params. For now I just want to get the data to work with. how to get it to log the data?
const params = {
latitude: "33.775867",
longitude: "-84.39733",
elevation: "50",
from_date: "2018-12-20",
to_date: "2018-12-22",
time: "08:00:00",
};
fetch("https://api.astronomyapi.com/api/v2/bodies/positions", params, {
method: "GET",
headers: {
Authorization: "Basic " + btoa("apllication id:aplaciton secret"),
},
})
.then((response) => response.json())
.then((data) => console.log(data));