This was discussed recently during the October monthly call (fpm-update-october-2020.pdf)
Fortran interface to curl for http requests: https://github.com/interkosmos/fortran-curl
If we end up needing more advanced git stuff than just downloading the code, we can wrap libgit2.
Per my comment in https://github.com/fortran-lang/fpm/issues/149#issuecomment-663703530, it seems all of these can in principle be done in pure Fortran, except the internet download of tarballs. For git repositories, we'll just assume that the git executable is installed, as we already do in haskell fpm. To be able to bootstrap fpm easily, we can just have all dependencies as git repositories and assume git is present on all platforms. Then in principle everything can be done in pure Fortran, which I think might be very helpful at least initially.
Then we can implement robust support for 3rd party non Fortran dependencies in the fortran fpm. Eventually we can then depend on curl or any other library (but if we do for fpm itself, it will always be more challenging to install it from source, say on HPC machines than if every dependency is pure Fortran).
FYI...somewhere i have a Fortran interface to WinINet that i wrote years ago. I think it was pretty rudimentary but it could be used to download files (on windows only of course). I can dig that up, but maybe you just want to stick with curl on all platforms?
Most helpful comment
Fortran interface to curl for http requests: https://github.com/interkosmos/fortran-curl
If we end up needing more advanced git stuff than just downloading the code, we can wrap libgit2.