PUT method from JavaScript
The PUT request is sent via JavaScript fetch when the button is clicked.