title: Express using acuityscheduling API
body: <p>I have tried a bunch of things with no success. Hope you guys can spare some knowledge.
  I am using acuityscheduling's API to retreive appointments. their documentation says to do something like this:</p>
  <p>on my express server:</p>
  <pre><code>  // https://acuityscheduling.com/api/v1/appointments?email=
    console.log(req.params);
    let email = req.params.email
    let apt;
    // res.send(&quot;appointments IS WORKING!!!&quot;)
    apt = acuity.request('/appointments?email='+email, function (err, res, appointments) {
      if (err) return console.error(err);
      apt = appointments;
      console.log(appointments)
    });
    console.log(apt);
    res.send(apt);
  })
  </code></pre>
  <p>when i do a request using insomnia:
  http://localhost:3000/appointments/email@gmail.com</p>
  <pre><code>  &quot;uri&quot;: {
      &quot;protocol&quot;: &quot;https:&quot;,
      &quot;slashes&quot;: true,
      &quot;auth&quot;: null,
      &quot;host&quot;: &quot;acuityscheduling.com&quot;,
      &quot;port&quot;: 443,
      &quot;hostname&quot;: &quot;acuityscheduling.com&quot;,
      &quot;hash&quot;: null,
      &quot;search&quot;: &quot;?email=email@gmail.com&quot;,
      &quot;query&quot;: &quot;email=email@gmail.com&quot;,
      &quot;pathname&quot;: &quot;/api/v1/appointments&quot;,
      &quot;path&quot;: &quot;/api/v1/appointments?email=lornebatman@gmail.com&quot;,
      &quot;href&quot;: &quot;https://acuityscheduling.com/api/v1/appointments?email=lornebatman@gmail.com&quot;
    },
    &quot;method&quot;: &quot;GET&quot;,
    &quot;headers&quot;: {
      &quot;User-Agent&quot;: &quot;AcuityScheduling-js/0.1.9&quot;,
      &quot;host&quot;: &quot;acuityscheduling.com&quot;,
      &quot;authorization&quot;: &quot;Basic MTQ1OTg2ODM6ZDdlZTA0YjljMjNjNTMwZTVmOGEzNzYzZmNkZDdmZWQ=&quot;,
      &quot;accept&quot;: &quot;application/json&quot;
    }
  }
  </code></pre>
  <p>but the output on my console returns the right data that I need.
  Why would this be happening?
  What am I missing to be able to retrieve the data from my frontend?</p>
  <p>Thank you so much.</p>