We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e0cd83 commit 8a8bee4Copy full SHA for 8a8bee4
2 files changed
README.md
@@ -113,6 +113,8 @@ UHRBase.prototype.request = function (parameters) { }
113
{
114
method: 'GET',
115
timeout: 30000,
116
+ // sets value to XMLHttpRequest.withCredentials, works only in the browser
117
+ withCredentials: false,
118
unsafeHTTPS: false, // require valid certificate by default
119
headers: {
120
Cookie: 'name=value'
browser/UHR.js
@@ -131,6 +131,10 @@ UHR.prototype._doRequest = function (parameters) {
131
);
132
xhr.timeout = parameters.timeout;
133
134
+ if (parameters.withCredentials) {
135
+ xhr.withCredentials = true;
136
+ }
137
+
138
Object.keys(parameters.headers)
139
.forEach(function (headerName) {
140
xhr.setRequestHeader(
0 commit comments