Get Free Trial

Using Http Interceptor in Angular

Majar K asked on April 3, 2020

I’m using flexmonster in my Angular 6 app. I’m trying to set up the custom data source API (!step2). We are using Angular Http Interceptor for setting the authorization headers (such as withCredentials and cookie). But the Interceptor is not intercepting the request initiated by the Flexmonster. Is there a way to fix it? If not what’s the alternative? How can I set the cookie in the requests initiated by flexmonster.
Majar K

2 answers

Dmytro Zvazhii Dmytro Zvazhii Flexmonster April 8, 2020

Hello Majar,
Thank you for giving us some time. 
We are going to add withCredentials support for Flexmonster requests for API data source in the nearest minor update, ETA Apr 21. Our team will notify you as soon as it is ready.
Meanwhile, you can try our customizeAPIRequest. It allows customizing request’s body and header with the necessary data. You can see more information in our docs:
Please let us know in case of any other question.

Illia Yatsyshyn Illia Yatsyshyn Flexmonster April 23, 2020

Hello, Majar,
We are glad to inform you that the dataSource.withCredentials property is now available for the custom API data source.
This is available in the 2.8.5 version of Flexmonster:
You are welcome to update the component.

Here is our updating to the latest version guide for assistance: 
Feel free to write to us in case of questions.
Best regards

Please login or Register to Submit Answer