After following the API tutorial, I attempted to post a GET request to http://localhost:3000/foo/bar and the response is just the web-app/index.html file.
When following the tutorial example of using the api from the client, I successfully get my data:
import React, { useEffect } from "react"; import { api } from "wasp/client/api";
async function fetchCustomRoute() { const res = await api.get("/foo/bar"); console.log(res.data); }