marbles
Version:
Front-end framework for routing, http, and data handling
24 lines (22 loc) • 486 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
/* @flow weak */
/**
* @memberof Marbles.HTTP.Middleware
* @desc Sets `withCredentials = true` on the XMLHttpRequest object
*/
var WithCredentials = {
willSendRequest: function willSendRequest(request) {
try {
request.xhr.withCredentials = true;
} catch (e) {
setTimeout(function () {
throw e;
}, 0);
}
}
};
exports["default"] = WithCredentials;
module.exports = exports["default"];