TranslationInterceptor
Defined in: src/interceptors/translation.interceptor.ts:19
Interceptor to add the current locale language header to HTTP requests.
Remarks
Adds a language header with value of the current LocaleConfig to each outgoing HTTP request.
Since
1.0.0
Author
Simon Kovtyk
Implements
HttpInterceptor
Constructors
Constructor
ts
new TranslationInterceptor(): TranslationInterceptor;Returns
TranslationInterceptor
Methods
intercept()
ts
intercept(httpRequest, httpHandler): Observable<HttpEvent<unknown>>;Defined in: src/interceptors/translation.interceptor.ts:22
Identifies and handles a given HTTP request.
Parameters
| Parameter | Type |
|---|---|
httpRequest | Readonly<HttpRequest<unknown>> |
httpHandler | Readonly<HttpHandler> |
Returns
Observable<HttpEvent<unknown>>
An observable of the event stream.
Implementation of
ts
HttpInterceptor.intercept