[Request] Simple "downloadFile()" function
ThatNerdyPikachu opened this issue · comments
I would like this added since the current method of downloading files is crazy.
The http_download(const char *url) function in this example provides what you want already.
Closing. libctru is not supposed to be a kitchen sink of random utility functions. The example projects exist for a reason.
@deltabeard the example project is... deleted?
But I want the content of it, I tried this example but it just tells me some stuff like the content size... I just want the content of it.
The example application does get the content (using httpcDownloadData()) and it stores the downloaded data in memory in a buffer called buf (which after download the example tries writing to the framebuffer). If you want to write it to a file, you can use fwrite.
Although I don't think the file the example is trying to download exists anymore.
Correct me if I am wrong.
@deltabeard example lives here: https://github.com/devkitPro/3ds-examples/tree/master/network/http
@oreo639 yes, that example's url gives me a 404.
Additionally, we now have a curl portlib.
@mtheall Thank you for linking the source code. I linked the documentation deliberately in this case.
This still doesn't work for me tho.
Could you be a little more description with what isn't actually working for you please?