Closed rogierlommers closed 5 years ago
This hasn't come up as a needed feature. You can already transfer files to []byte
using the standard library. This package is more useful for writing to disk - resolving a file name, managing the file handle, resuming, etc.
Do you have a specific use case I could consider?
Yeah, I now indeed use the std lib for downloading into a []byte
. So no real need. But sometimes it could be useful to have the option in your grab package as well, if you don't want to develop the request + performRequest yourself.
Kind of laziness I think :).
Haha sounds fair. I'll keep this in mind and leave open for now, thanks!
You may now store downloads in memory by setting Request.NoStore
. Access the raw bytes with Response.Open
or Response.Bytes
. Feedback welcome 🍻
Thanks!
Hey, it's working fine. One thing though: can you make a release out of it? "dep" ensuring your package now uses tag 2.0, which doesn't contain the new features.
Did you ever consider GET'ting files to
[]bytes
, instead of writing to disk?