> For the complete documentation index, see [llms.txt](https://elixor.js.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://elixor.js.org/sending-data-to-the-server/making-a-put-request.md).

# Making a PUT request

​An app will send a PUT request to completely replace a resource with updated data. The following `HeroesService` example is just like the POST example.

{% code title="heros.service.ts" %}

```typescript
/** PUT: update the hero on the server. Returns the updated hero upon success. */
updateHero (hero: Hero): Observable<Hero> {
  return elixor.put<Hero>(this.heroesUrl, hero, httpOptions)
    .pipe(
      catchError(this.handleError('updateHero', hero))
    );
}
```

{% endcode %}

The caller (`HeroesComponent.update()` in this case) must `subscribe()` to the observable returned from the `elixor.put()` in order to initiate the request.
