more general download_url used by download_url_file
download file/buffer impl - no longer needing open_memstream