Having issue fetching data from azure sql databse to satatic web app (error 400)

Mattias Clouse 0 Reputation points
2024-06-04T19:10:40.2733333+00:00

I am trying to create an application that displays my database that I have made in azure sql server. I have a swa-db-connections folder with my db entity along with my connection string and everythign else. in my workflow, I have api and data-api set to the swa-db-connections. When I use the fetch request I use fetch('data-api/api/Product') but I keep getting the 400 error code. What am I doing wrong??

Azure SQL Database
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
850 questions
{count} votes