Many APIs expect an Authorization header. This lab only demonstrates attaching Bearer + a fake token — JSONPlaceholder ignores it. Never put real secrets in front-end source for production.

Results appear here.

Attach a Bearer token and fetch a post.

Important JavaScript

const response = await fetch(url, {
  headers: {
    Authorization: "Bearer " + token,
    Accept: "application/json"
  }
});