
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-21-2017 11:52 AM
Looking for options how to execute XMLHttpRequest with the current (logged in) user's credentials.
Very simple code (UI script), same domain/origin, but it doesn't work - every time it asks for credentials:
var data = JSON.stringify({
"short_description": "Hello"
});
var xhr = new XMLHttpRequest();
xhr.withCredentials = true;
xhr.open("POST", "https://XXXX.service-now.com/api/now/table/incident");
xhr.setRequestHeader("content-type", "application/json");
xhr.setRequestHeader("Access-Control-Allow-Credentials","true");
xhr.send(data);
Any ideas? josh.nerius?
Solved! Go to Solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2017 09:26 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-22-2017 09:26 AM
Found the solution: X-UserToken