SpinTheMic
Pro

Interview practice question

Building a robust request layer for a large app

Frontend Engineering · Async JavaScript and the Browser · Experienced

Different parts of your app handle API requests inconsistently, with duplicated logic and bugs. How would you design a shared request layer?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Central client: auth headers, base URL, errors.
  • Timeouts, retries with backoff for safe requests.
  • Deduplication and caching (query library).
  • Cancellation via AbortSignal.
  • Typed responses, logging/monitoring hooks.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics