> angular-http-client

Best practices for HttpClient, Interceptors, and API interactions. Use when integrating HttpClient, writing interceptors, or handling API calls in Angular. (triggers: **/*.service.ts, **/*.interceptor.ts, HttpClient, HttpInterceptorFn, withInterceptors)

fetch
$curl "https://skillshub.wtf/HoangNguyen0403/agent-skills-standard/angular-http-client?format=md"
SKILL.mdangular-http-client

HTTP Client

Priority: P1 (HIGH)

Principles

  • Functional Interceptors: Use HttpInterceptorFn. Class-based interceptors are deprecated.
  • Typed Responses: Always type http.get<User[]>().
  • Services: Encapsulate all HTTP calls in Services. Never call http in Components.

Guidelines

  • Caching: Implement caching in interceptors or using shareReplay(1) in services.
  • Error Handling: Catch errors in services or global interceptors, not components.
  • Context: Use HttpContext to pass metadata to interceptors (e.g., specific caching rules).

References

🚫 Anti-Patterns

  • Do NOT use standard patterns if specific project rules exist.
  • Do NOT ignore error handling or edge cases.

┌ stats

installs/wk0
░░░░░░░░░░
github stars341
██████████
first seenMar 17, 2026
└────────────

┌ repo

HoangNguyen0403/agent-skills-standard
by HoangNguyen0403
└────────────

┌ tags

└────────────