Blazor Server Call Web Api / Rest Api from Blazor Component in Asp.Net Core Tutorial

preview_player
Показать описание
WATCH BLAZOR SHOPPING CART COMPLETE PROJECT

For .net 6 how to call webapi refer this video
Рекомендации по теме
Комментарии
Автор

Maybe the best 17m of tutorial I've ever seen. Outstanding. Thanks.

cbc
Автор

Man! You did bring the bread to the table! Many thanks for this! A great help for understanding Blazor+WebAPI relation. Super thanks!

ebarednaxela
Автор

Nice, thats awesome how simply you explain that!

kamilmikua
Автор

Excellent tutorial! Thank you for this! I like that is a simple direct example, it quickly shows the point of the matter ! Keep them coming.👍
Just a comment though, the blazor httpclient used to call the api is no longer maintained.

emanuelfaisca
Автор

edit: ok a "swagger" tab also appears with different port (to the hello world one), my api does work from here!..

TYNEPUNK
Автор

Would be great if you could explain what you do, instead of just ctrl+c ctrl+v the start of the function, so that we know why certain things are done.

Oliver-dev
Автор

Hello Thanks for this, this is a nice structure, I've followed just u can split the pages and service in a share class library (rcl) in oreder to be easy if u want to switch from blazor server to Wasm

I'have on question
how can I authenticate and authorize the user in this approach
(if u can provide me an example as I searched a lot but need to knw the best practice
)
thanks in advance

MostafaZaki_fcih
Автор

Good, do you have a tutorial for submiting things via json, not just reading them?

TYNEPUNK
Автор

cant find class library (.net core) either, is it the same as class library (.net framework) ?

TYNEPUNK
Автор

thanks, tho i cannot find blazor app, i see blazor web app and server app.

TYNEPUNK
Автор

package has been discontinued :(
Can you suggest something as simple as this package?

karol
Автор

ok i started again, got further, but visiting the api url i see Sorry, there's nothing at this address.... grr

TYNEPUNK
Автор

Thank you.!! for your service..Blazor.. :)
i don't understand..why not uncheck "Configure for HTTPS" play time 1:41 ...
can you explane...?

cqmehni
Автор

Hello, very good video and intuitive. A query just in case there is an example that uses the same structure. Web API separate from blazor but in authentication. I mean that the API provides JWT and BLAZOR consumes said API.

reiner-vaca
Автор

is no longer available.
use "System.Net.Http.Json" instead.

Replace:
"return await
with
"return await HttpClientJsonExtensions.GetFromJsonAsync<Product[]>(this.httpClient, "api/product/getProducts", CancellationToken.None);"

douglasperalta