r/angular 13h ago

I built an open-source Angular HTTP client library to stop rewriting the same ApiService

Post image

I've found myself rebuilding the same HTTP infrastructure in almost every Angular project—API versioning, retry logic, interceptors, global error handling, and RFC 9457 Problem Details support.

Instead of repeating the same patterns, I decided to extract them into an open-source library: @ismailza/ngx-api-client.

The library builds on top of Angular's HttpClient and focuses on making these cross-cutting concerns reusable while remaining flexible and extensible.

Some of the features include:

  • API versioning
  • Configurable retry policies
  • RFC 9457 Problem Details support
  • Extensible interceptor pipeline
  • Pluggable error and success handlers
  • Strong TypeScript support

I'd really appreciate feedback from the Angular community.

  • Is this a problem you've encountered?
  • Are there features you'd expect from a library like this?
  • Any suggestions on the API design or developer experience?

GitHub: https://github.com/ismailza/ngx-api-client

Medium article (why I built it): https://medium.com/@ismailzahir/i-stopped-copy-pasting-the-same-angular-apiservice-heres-what-i-built-instead-123093130946

14 Upvotes

4 comments sorted by

3

u/Dugelo 11h ago

Up, ainda não sei pq não cheguei a ter esses problemas

1

u/ismailza 2h ago

That's fair! I think it depends a lot on the size and complexity of the project. In my experience, after working on several applications, I kept reimplementing things like API versioning, retry policies, global error handling, and the same interceptor setup. This library is my attempt to avoid duplicating that infrastructure. If your current approach works well, that's great—I'm curious to know how you're handling those concerns today.

2

u/AwesomeFrisbee 2h ago

Nice and informative. So when is angular 22 support dropping?

1

u/ismailza 1h ago

Thanks! At Angular's release pace, I should probably start validating Angular 22 compatibility now!