From the course: Migrating ASP.NET Core Web Applications to Azure
Unlock the full course today
Join today to access over 24,600 courses taught by industry experts.
Calling Azure Functions from Blazor WebAssembly - ASP.NET Core Tutorial
From the course: Migrating ASP.NET Core Web Applications to Azure
Calling Azure Functions from Blazor WebAssembly
- [Instructor] We can now update the Blazor WebAssembly application to use that Azure Function or those Azure Functions. So we start in the Program.cs file where the HTTP client is configured and by default, the base address for HTTP calls is the current origin, the server where the Blazor application runs on. And we're changing that. So instead of that base address, we are using our Azure Functions URL. I just copied that to the clipboard. So let's put that in here. And then when calling the various endpoints, we just have to check whether the URIs in order. So what are we doing here? We are calling the sample data and then categories.json endpoint. And this has to be replaced with api/categories now. The same thing is true for the call in the product detail page. So we need the products, so api/products. And in the list of all products in one category, we also need to call the api/products endpoint. So let's…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
ASP.NET Core options3m 12s
-
(Locked)
Looking at the sample application2m 55s
-
(Locked)
Deploying a web application to Azure with Visual Studio4m 11s
-
(Locked)
Deploying a web application to Azure with Visual Studio Code5m 42s
-
(Locked)
Deploying Blazor applications to Azure8m 15s
-
(Locked)
Using Azure Functions9m 2s
-
(Locked)
Deploying Azure Functions4m 14s
-
(Locked)
Calling Azure Functions from Blazor WebAssembly3m 27s
-
(Locked)
-
-
-