Closed
Description
Is your feature request related to a problem?
My client application download huge files from a server using Download(std::ofstream& file)
.
But I realized that no error was raised when the writing fails (in my case the disk was full).
So I switched to Download(const WriteCallback& write)
to manage the iostream myself (using this method ) but I noticed that the data is copied to a string for each callback, so it was not equivalent to the previous code.
Possible Solution
I suggest to use a std::string_view
as argument instead of a std::string
in the WriteCallback
.
Alternatives
No response
Additional Context
No response