Unauthorised error is thrown when using stream to pipe the response
serhiiminin opened this issue · 5 comments
serhiiminin commented
When I use responseType: 'stream'
I get the unauthorized error (401).
https://github.com/axios/axios#axios-api
const client = NtlmClient(credentials);
const response = await client({
url: 'https://example.com',
method: 'post',
responseType: 'stream',
data: { name: "Jack" },
});
response.data.pipe(fs.createWriteStream('ada_lovelace.jpg'));
I use version 1.2.1
ma-zal commented
I confirm, this issue exists.
manodupont commented
+1
arontsang commented
+1
Can confirm this issue exists.
Also. Here is the fix.
Thanks goes to @serhiiminin without whom, I would still be questioning my sanity...
arontsang commented
@serhiiminin @ma-zal @manodupont please can you check if v1.3.0 fixes your issue. 😃
serhiiminin commented
Hi, sorry for the late reply. I was away for some time.
I can confirm that the issue is gone. Unfortunately, I faced another issue. Now I am getting error 400 Bad Request when making POST requests with the same setup