Body
body
curl -X PUT https://tcpdata.com/put \
-H "Content-Type: application/json" \
-d '{"id":123,"status":"updated"}'
fetch('https://tcpdata.com/put', {
method: 'PUT',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ id: 123, status: 'updated' })
})
.then(res => res.json())
.then(data => console.log(data));
import requests
response = requests.put('https://tcpdata.com/put',
json={'id': 123, 'status': 'updated'})
print(response.json())