Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Why must an interceptor clone the request before modifying it?

  1. A For performance reasons
  2. B Because HttpRequest objects are immutable
  3. C To support multiple interceptors
  4. D To enable caching
Answer

Because HttpRequest objects are immutable

The correct pattern is req.clone({ setHeaders: {...} }). Attempting to mutate the original request directly has no effect.

All Angular MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as