https://api.example.com/users{
"name": "John Doe",
"email": "john@example.com"
}fetch("https://api.example.com/users", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer token123"
},
body: JSON.stringify({"name": "John Doe", "email": "john@example.com"})
})
.then(response => response.json())
.then(data => console.log(data))
.catch(error => console.error("Error:", error));