fetch(require('xwiki-meta').restURL, {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Accept': 'application/json'
},
body: JSON.stringify({
content: 'Updated content'
})
})
.then(response => response.json())
.then(json => {
console.log('Response:', json);
})
.catch(error => {
console.error('Error sending PUT request:', error);
});