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
In the code example I see these two lines in the end:
let content = response.text()?;
std::io::copy(&mut content.as_bytes(),&mut output_file)?;
Looks like the first line is getting text from response of previous .head() call -- that should be empty string? Then the second line turns that text into bytes then appends to the output_file -- output_file should already contain content of the file to be downloaded, that's done by the for loop above these two lines. So I wonder if these lines are necessary, or am I missing something here?
The text was updated successfully, but these errors were encountered:
In the code example I see these two lines in the end:
Looks like the first line is getting text from response of previous
.head()
call -- that should be empty string? Then the second line turns that text into bytes then appends to theoutput_file
--output_file
should already contain content of the file to be downloaded, that's done by the for loop above these two lines. So I wonder if these lines are necessary, or am I missing something here?The text was updated successfully, but these errors were encountered: