I am new to Azure functions. I have a scenario like to call the published Azure function in a Blazor wasm app using C#, using a relative published URL.
Could you please help us like how configure the HttpClient in the Azure function app and call the relative url from the client?
I tried calling the Azure Functions URL in
FetchDatabut it did not fetch the value.FetchData.razor:-In order to achieve your task, Create your Function files like Function.cs inside an API folder by referring this Github Repository:-
And deploy this Repository code in Azure static web app, You have an option to add the Function manually or the Function inside the API folder is added automatically as API like below:-
Output:-