Live Chat Icon For mobile
Live Chat Icon

How do you send an HTTP PUT request using HttpClient in Blazor?

Platform: Blazor| Category: Web API

The HTTP PUT method is used to completely replace a resource on the API server. We can use the HttpClient to send a PUT request to an API server using the SendJsonAsync () method. 


@page "/employee/edit"
@inject HttpClient Http

.. .. .. .. .. .. 
.. .. .. .. .. ..

@code {
    Employee emp = new Employee();
    protected async Task UpdateEmployee()
        await Http.SendJsonAsync(HttpMethod.Put, "api/Employee/Edit", emp);



public void Edit([FromBody]Employee employee)
    if (ModelState.IsValid)

Reference link:

Share with

Share on twitter
Share on facebook
Share on linkedin

Related FAQs

Couldn't find the FAQs you're looking for?

Please submit your question and answer.