How do I download a file from FastAPI backend using JavaScript Fetch API in the frontend?
First, you need to adjust your endpoint on server side to accept path parameters, as in the way that is currently defined, lat and long are expected to be query parameters instead; however, in the JavaScript code you provided, it seems that you are trying to send those coordinates as path parameters. Thus, your endpoint … Read more