Skip to content

Commit b5d0a22

Browse files
author
REDMOND\lahuey
committed
update javascript file
1 parent eca7fd6 commit b5d0a22

File tree

1 file changed

+18
-11
lines changed

1 file changed

+18
-11
lines changed

lib/graph-js-sdk-web.js

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ window.MicrosoftGraph = require('./lib/src/index.js');
66
"use strict";
77
Object.defineProperty(exports, "__esModule", { value: true });
88
var es6_promise_1 = require("es6-promise");
9-
require("whatwg-fetch");
9+
require("isomorphic-fetch");
1010
var common_1 = require("./common");
1111
var ResponseHandler_1 = require("./ResponseHandler");
1212
var RequestMethod_1 = require("./RequestMethod");
@@ -244,10 +244,9 @@ var GraphRequest = (function () {
244244
});
245245
};
246246
GraphRequest.prototype.configureRequest = function (request, accessToken) {
247+
var _this = this;
247248
request.headers.append('Authorization', 'Bearer ' + accessToken);
248-
for (var key in this._headers) {
249-
request.headers.append(key, this._headers[key]);
250-
}
249+
Object.keys(this._headers).forEach(function (key) { return request.headers.append(key, _this._headers[key]); });
251250
request.headers.append('SdkVersion', "graph-js-" + packageInfo.version);
252251
return request;
253252
};
@@ -313,7 +312,7 @@ var GraphRequest = (function () {
313312
}());
314313
exports.GraphRequest = GraphRequest;
315314

316-
},{"../../package.json":10,"./RequestMethod":3,"./ResponseHandler":4,"./common":5,"es6-promise":7,"whatwg-fetch":9}],3:[function(require,module,exports){
315+
},{"../../package.json":11,"./RequestMethod":3,"./ResponseHandler":4,"./common":5,"es6-promise":7,"isomorphic-fetch":8}],3:[function(require,module,exports){
317316
"use strict";
318317
Object.defineProperty(exports, "__esModule", { value: true });
319318
var RequestMethod;
@@ -1578,7 +1577,15 @@ return Promise$2;
15781577

15791578

15801579
}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
1581-
},{"_process":8}],8:[function(require,module,exports){
1580+
},{"_process":9}],8:[function(require,module,exports){
1581+
// the whatwg-fetch polyfill installs the fetch() function
1582+
// on the global object (window or self)
1583+
//
1584+
// Return that as the export for use in Webpack, Browserify etc.
1585+
require('whatwg-fetch');
1586+
module.exports = self.fetch.bind(self);
1587+
1588+
},{"whatwg-fetch":10}],9:[function(require,module,exports){
15821589
// shim for using process in browser
15831590
var process = module.exports = {};
15841591

@@ -1764,7 +1771,7 @@ process.chdir = function (dir) {
17641771
};
17651772
process.umask = function() { return 0; };
17661773

1767-
},{}],9:[function(require,module,exports){
1774+
},{}],10:[function(require,module,exports){
17681775
(function(self) {
17691776
'use strict';
17701777

@@ -2227,7 +2234,7 @@ process.umask = function() { return 0; };
22272234
self.fetch.polyfill = true
22282235
})(typeof self !== 'undefined' ? self : this);
22292236

2230-
},{}],10:[function(require,module,exports){
2237+
},{}],11:[function(require,module,exports){
22312238
module.exports={
22322239
"name": "@microsoft/microsoft-graph-client",
22332240
"version": "1.0.0",
@@ -2243,16 +2250,16 @@ module.exports={
22432250
"@types/node": "^9.4.0",
22442251
"browserify": "^13.1.0",
22452252
"mocha": "^3.2.0",
2246-
"typescript": "^2.2.1",
2247-
"whatwg-fetch": "^2.0.3"
2253+
"typescript": "^2.2.1"
22482254
},
22492255
"scripts": {
22502256
"build": "tsc && node node-browserify.js > lib/graph-js-sdk-web.js",
22512257
"test": "mocha lib/spec/core",
22522258
"test:types": "tsc --p spec/types && mocha spec/types"
22532259
},
22542260
"dependencies": {
2255-
"es6-promise": "^4.1.0"
2261+
"es6-promise": "^4.1.0",
2262+
"isomorphic-fetch": "^2.2.1"
22562263
},
22572264
"repository": {
22582265
"type": "git",

0 commit comments

Comments
 (0)