[downloader:http] support using a different method than GET (#2433)

by setting the '_http_method' metadata field for a file
pull/2439/head
Mike Fährmann 3 years ago
parent 6f1d5e8ab9
commit be3492776b
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

@ -120,9 +120,9 @@ class HttpDownloader(DownloaderBase):
# connect to (remote) source
try:
response = self.session.request(
"GET", url, stream=True, headers=headers,
timeout=self.timeout, verify=self.verify,
proxies=self.proxies)
kwdict.get("_http_method", "GET"), url,
stream=True, headers=headers, timeout=self.timeout,
verify=self.verify, proxies=self.proxies)
except (ConnectionError, Timeout) as exc:
msg = str(exc)
continue

Loading…
Cancel
Save