var xhr = new XMLHttpRequest();
xhr.open('GET', 'http://example.com/', true);
xhr.withCredentials = true;
xhr.send();
fetch('https://example.com', {
credentials: 'include'
})
$.ajax({
url: 'https://example.com',
xhrFields: {
withCredentials: true
}
});