Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Http.SendJsonAsync failed on 0.7 #1731
we try to follow this tutiorial
for CRUD operation on V0.3 of blazor Work perfect
but on our 0.7 version when we try to send data with
await Http.SendJsonAsync(HttpMethod.Post, "/api/Employee/Create", emp);
the data not send to api method create and the nav refresh the blazor app :( (stay on creation page)
thanks for your help
The type attribute should be set to button: type="button"
I can't help it if you know what I mean..just don't ...
thanks for your answer, with the type "button" we have this error :
Microsoft.AspNetCore.Hosting.Internal.WebHost:Information: Request starting HTTP/1.1 POST http://localhost:57845/api/SampleData/Create application/json; charset=utf-8 72
System.InvalidOperationException: The SPA default page middleware could not return the default page '/index.html' because it was not found, and no other middleware handled the request.
at Microsoft.AspNetCore.SpaServices.SpaDefaultPageMiddleware.<>c__DisplayClass0_0.b__1(HttpContext context, Func`1 next)
"thanks for your answer, with the type "button" we have this error :"
Mate, don't you understand what's wrong with the code...?
You should remove the
I don't want to speak ill of others, but you should not visit that web site. You are not the first person who have faced such unnecessary issues just because the author of the tutorial himself is lacking any basic knowledge of what he's teaching...
Hope this helps...