'Jasper Server keeps on redirecting on PUT rest call

I am trying to work with jasper server using rest call from angular project. I am using basic authentication and i am able to download a report from jasper server using get call. Now I have to update some resources but the same method keeps on redirecting me to login.html. The same link with headers work fine in postman but it keeps on redirecting me in angular.

enter image description here



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source