How to set "crossDomain: true" in Angular HttpClient header

Viewed 6

How I can convert this ajax call to angular httpClient call. I am getting Cors error

$.ajax({
                            type: "GET",
                            url: reportAccessUrl+"/hi-ee/j_spring_security_logout",
                            xhrFields: { withCredentials: true },
                            crossDomain: true,
                            dataType: 'jsonp',
                            success: function(data) 
                            {
                                console.log("Logout successfully");
                            }, 
                            error: function(data)
                            {
                                console.log("Logout Error");
                            }
                        }); 
0 Answers
Related