Example API Request (Update Profile)
fetch('http://localhost:5000/api/profile', {
method: 'PUT',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer YOUR_TOKEN`
},
body: JSON.stringify({
firstName: "John",
lastName: "Doe",
phoneNumber: "123456789",
about: "Real estate expert."
})
})
.then(res => res.json())
.then(data => console.log(data))
.catch(err => console.error(err));Source captured: 2026-10-11