You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When trying to use the "Promise" syntax of the .getStream method (ie. with no callback),
client.api(url).getStream()
.then(stream => {
// do something with stream
})
.catch(err => {
// do domething with err
})
I get the following error:
TypeError: Cannot read property 'then' of undefined
Nevertheless, the"callback" syntax works great:
return new Promise((resolve, reject) => {
client.api(url).getStream((err, stream) => {
if (err) {
// do domething with err
}
else {
// do something with stream
}
});
});
The text was updated successfully, but these errors were encountered:
client.api(url).putStream(buffer)
.then(response => {
// do something with response
})
gives the following error:
TypeError: callback is not a function
at Function.ResponseHandler.init (/.../node_modules/@microsoft/microsoft-graph-client/src/ResponseHandler.ts:6:13)
at /.../node_modules/@microsoft/microsoft-graph-client/src/GraphRequest.ts:291:33
at process._tickCallback (internal/process/next_tick.js:68:7)
jmorino
changed the title
Method .getStream doesn't support Promises
Methods .getStream and .putStream doesn't support Promises
Sep 10, 2018
jmorino
changed the title
Methods .getStream and .putStream doesn't support Promises
Methods .getStream and .putStream don't support Promises
Sep 10, 2018
When trying to use the "Promise" syntax of the
.getStream
method (ie. with no callback),I get the following error:
Nevertheless, the"callback" syntax works great:
The text was updated successfully, but these errors were encountered: