You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I need to use in my application a custom header in response to a getList (header is totalElements).
It is correctly set by the backend, but of course in restangular the headers map only cointained the "default allowed" ones. For that reason I added Access-Control-Exposed-Headers. It is correctly returned, as per the following response, but after this change restangular does not populate the headers map entries
Turns out (response.headers as any).lazyInit();
was needed at the start of the ResponseInterceptor.
Which kinda makes sense, being a lazy initializer, but I wonder why in the default case (if the Expose-Headers was not set) they were initialized by default.
This behavior I think should be documented
I need to use in my application a custom header in response to a getList (header is totalElements).
It is correctly set by the backend, but of course in restangular the headers map only cointained the "default allowed" ones. For that reason I added Access-Control-Exposed-Headers. It is correctly returned, as per the following response, but after this change restangular does not populate the headers map entries
The text was updated successfully, but these errors were encountered: