1
0
mirror of https://github.com/mikf/gallery-dl.git synced 2024-11-22 18:53:21 +01:00

[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
No known key found for this signature in database
GPG Key ID: 5680CA389D365A88

View File

@ -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