You learned Fetch in the async section. Here's a quick review with more options:
const response = await fetch("/api/data", {
method: "POST",
headers: {
"Content-Type": "application/json",
"Authorization": "Bearer token"
},
body: JSON.stringify(data),
credentials: "include" // Send cookies
});