File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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'
Original file line number Diff line number Diff 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 (
Original file line number Diff line number Diff line change 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" ,
You can’t perform that action at this time.
0 commit comments