We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Is it possible to get response headers when using createReadStream method?
createReadStream
As I see in createStream.js:
createStream.js
return request(requestOptions).then(responseHandlers.handleResponseCode).then(res => res.data);
.then(res => res.data) - this makes possible to access only body
.then(res => res.data)
The text was updated successfully, but these errors were encountered:
Found workaround:
const axios = require("axios"); const url = client.getFileDownloadLink(davPath); axios({ method: 'get', url: url, responseType: 'stream' }).then(response => { console.log('headers', response.headers); response.data.pipe(..); });
Sorry, something went wrong.
I'll definitely add a method for making this easier, like a promise-based getReadStream() that will resolve with the stream and headers.
getReadStream()
perry-mitchell
Successfully merging a pull request may close this issue.
Is it possible to get response headers when using
createReadStream
method?As I see in
createStream.js
:.then(res => res.data)
- this makes possible to access only bodyThe text was updated successfully, but these errors were encountered: