node-libcurl icon indicating copy to clipboard operation
node-libcurl copied to clipboard

How to not show download in stdout/stderr?

Open MikeOBarometer opened this issue 2 years ago • 2 comments

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

MikeOBarometer avatar Apr 29 '22 20:04 MikeOBarometer

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 avatar May 03 '22 15:05 MikeOBarometer

@MikeOBarometer could you share a sample code that reproduces the issue?

JCMais avatar May 14 '22 16:05 JCMais