fdroidserver.net module¶
- fdroidserver.net.download_file(url, local_filename=None, dldir='tmp', retries=3, backoff_factor=0.1)¶
- fdroidserver.net.http_get(url, etag=None, timeout=600)¶
Download the content from the given URL by making a GET request.
If an ETag is given, it will do a HEAD request first, to see if the content changed.
- Parameters:
- url
The URL to download from.
- etag
The last ETag to be used for the request (optional).
- Returns:
- A tuple consisting of:
The raw content that was downloaded or None if it did not change
The new eTag as returned by the HTTP request