Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

166
Views
using paramters in a fetch get call?

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));
about 4 years ago · Juan Pablo Isaza
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!