Auth & HTTP

HTTP headers

Inspect a real same-origin fixture response and compare guided CORS and cache exchanges.

Back to learning paths
AUTH & HTTP / REQUEST PATH
Lesson flow Component. HttpClient. Interceptors. API server. Content-Type. ComponentHttpClientInterceptorsAPI serverContent-Type

REQUEST · SYNTHETIC LESSON DATA

Event log

  1. Read the response headers

Objective

Read request and response headers and predict the results of a preflight or cache revalidation.

Transcript

Angular 22.3.2

  1. The browser asks for JSON using Accept. The dedicated lesson endpoint responds with a Content-Type and a no-store cache policy.
  2. The CORS scenario models OPTIONS before a credentialed cross-origin POST. The browser compares origin, credential, method and header permissions before sending the POST.
  3. A wildcard origin does not permit credentialed access. The permitted example uses the exact origin and matching permission headers.
  4. In the cache scenario the browser has a stored private response that requires revalidation. It sends If-None-Match, and a matching ETag produces a 304 without a replacement body.

Sources