HTTP interceptors / services configure in Angular
Ngx HTTP configure is a library for Angular that helps you reconfigure your interceptors in a clear and concise way by extending the HttpClient API
Installation
To install this library, run:
$ npm install ngx-http-configure
Using the library
Import the configure()
helper in your injectable service:
The configure function takes the same parameters as the options http request object.
;; // Import the configure helper from lib;
Once your service method is configured, you can use its options in your interceptor:
;;; ; /** * Prefixes all requests not starting with `http[s]` with configure `baseUrl`. */
License
MIT © Danier Rivas