What is wrong with the following api call to logout user?
I encountered this error with angularjs(D8.5). This code works for me.

getUserLogout(logoutToken,csrfToken) {
  // post logout
  return this.http.get(
    'http://localhost:8082/d8/api/user/logout?_format=json&amp;token='+logoutToken,
    {
      headers:
      {
        'X-CSRF-Token': csrfToken
      },
      withCredentials: true
    }
  );
}