const res = await fetch("https://api.example.com/v1/users?notify=true", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Accept": "application/json",
"Content-Type": "application/json",
},
body: JSON.stringify({
"name": "Jan Kowalski",
"email": "[email protected]"
}),
});
const data = await res.json();