node-libcurl
node-libcurl copied to clipboard
How to not show download in stdout/stderr?
When downloading files via the library I see progress printed to terminal when I would not have expected it to, is there a way to disable these?
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 1180k 100 1180k 0 0 587k 0 0:00:02 0:00:02 --:--:-- 588k % Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0 % Total % Received % Xferd Average Speed Time Time Time Curren
This occurs in stream mode as the NOPROGRESS opt is explicitly set to false here: https://github.com/JCMais/node-libcurl/blob/f88792dd196c0267a3b7cc889b24cb6902e1a3d9/lib/Curl.ts#L740
A workaround here is to not use the stream enabled mode and use writeFunction or { data } response instead.
@MikeOBarometer could you share a sample code that reproduces the issue?