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

by setting the '_http_method' metadata field for a file
This commit is contained in:
Mike Fährmann
2022-03-20 10:09:05 +01:00
parent 6f1d5e8ab9
commit be3492776b

View File

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