I'm trying to download a file ( https://micro.mamba.pm/api/micromamba/linux-64/latest ) using httpclient, and it looks like the download is redirected twice, the first one being:
//api.anaconda.org/download/conda-forge/micromamba/1.1.0/linux-64/micromamba-1.1.0-0.tar.bz2
I've never come across a Location: ` header like this, with a missing `http/https prefix, but wget seems to be able to download it, so I assume it's not that uncommon. Anyway, trying to download this with the nim httpclient I'm getting an error:
Error: unhandled exception: No uri scheme supplied. [ValueError]
Is there any way to use httpclient to download from a url like this, or should I use libcurl or maybe puppy (not sure if that can download binary files). I guess I could try to resolve the redirects myself somehow, but before I do that, I wanted to see if anyone else has encountered something similar...
Thanks for confirming that its an issue with httpclient. Not sure if I feel confident enough in my nim-foo to contribute something like this (plus tests, etc), but I'll have a look at the docs whats required to contribute to nim, and at the httpclient code.
For now, I'm using puppy for the download which seems to work, and has the additional benefit of not requiring ssl which I think is pretty neat, but it'd be nice to have finer level control like httpclient offers.