Skip to content

Commit d0102f4

Browse files
author
Denis Rechkunov
committed
Merge branch 'release/4.1.0'
2 parents c398d31 + 6e184ba commit d0102f4

3 files changed

Lines changed: 7 additions & 1 deletion

File tree

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,8 @@ UHRBase.prototype.request = function (parameters) { }
113113
{
114114
method: 'GET',
115115
timeout: 30000,
116+
// sets value to XMLHttpRequest.withCredentials, works only in the browser
117+
withCredentials: false,
116118
unsafeHTTPS: false, // require valid certificate by default
117119
headers: {
118120
Cookie: 'name=value'

browser/UHR.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,10 @@ UHR.prototype._doRequest = function (parameters) {
131131
);
132132
xhr.timeout = parameters.timeout;
133133

134+
if (parameters.withCredentials) {
135+
xhr.withCredentials = true;
136+
}
137+
134138
Object.keys(parameters.headers)
135139
.forEach(function (headerName) {
136140
xhr.setRequestHeader(

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "catberry-uhr",
3-
"version": "4.0.4",
3+
"version": "4.1.0",
44
"author": "Denis Rechkunov <denis.rechkunov@gmail.com>",
55
"description": "Universal HTTP(S) Request module for catberry framework",
66
"homepage": "https://github.com/catberry/catberry-uhr",

0 commit comments

Comments
 (0)