title: How can I send query parameters using fetch to server?
body: <p>I have an express.js server that makes a HTTP GET Request to retrieve weather data. In my JavaScript, I obtain the latitude and longitude variables. I need to send those variables to my express.js server using fetch. How can I do this?</p>
  
  <p>I have tried sending the query parameters as the body of the request object, but I learned GET requests cannot do that.</p>
  
  <p>Express Server Code:</p>
  
  <pre><code>app.get("/data", (req, res) =&gt; {
  url  =  `http://api.openweathermap.org/data/2.5/uvi?appid=${API}&amp;lat=${latitude}&amp;lon=${longitude}`;
  
  axios
      .get(url)
      .then(response  =&gt; {
          res.send(response.data);
      })
      .catch(error  =&gt; {
          console.log(errorx);
      });
  });
  </code></pre>
  
  <p>How would I get the latitude and longitude variables from my JavaScript?</p>
  
  <p>I expect the express server to have the required variables and perform the GET request.</p>