title: How to make an http request return it's response inside a route
body: <p>I have a route that I want to take the data given to it and send it in an http request and return the response in my route. What I have done is that I have this call function that sends the http request and returns the response</p>
  
  <pre><code>async function call() {
      axios
      .post("https://jsonplaceholder.typicode.com/posts", {
        title: "foo",
        body: "bar",
        userId: 1,
      })
      .then((res) =&gt; {
        return { answer: 30 };
      })
      .catch((error) =&gt; {
        console.error(error);
      });
  }
  </code></pre>
  
  <p>I tried to call it in the route but it doesn't wait for the http request to finish.</p>