mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-05-11 18:36:33 +02:00
parent
ed6c6d7eef
commit
ceab4d5ed6
3 changed files with 4 additions and 0 deletions
|
@ -39,6 +39,7 @@ from yt_dlp.cookies import YoutubeDLCookieJar
|
|||
from yt_dlp.dependencies import brotli, curl_cffi, requests, urllib3
|
||||
from yt_dlp.networking import (
|
||||
HEADRequest,
|
||||
PATCHRequest,
|
||||
PUTRequest,
|
||||
Request,
|
||||
RequestDirector,
|
||||
|
@ -1856,6 +1857,7 @@ class TestRequest:
|
|||
|
||||
def test_request_helpers(self):
|
||||
assert HEADRequest('http://example.com').method == 'HEAD'
|
||||
assert PATCHRequest('http://example.com').method == 'PATCH'
|
||||
assert PUTRequest('http://example.com').method == 'PUT'
|
||||
|
||||
def test_headers(self):
|
||||
|
|
|
@ -3,6 +3,7 @@ import warnings
|
|||
|
||||
from .common import (
|
||||
HEADRequest,
|
||||
PATCHRequest,
|
||||
PUTRequest,
|
||||
Request,
|
||||
RequestDirector,
|
||||
|
|
|
@ -505,6 +505,7 @@ class Request:
|
|||
|
||||
|
||||
HEADRequest = functools.partial(Request, method='HEAD')
|
||||
PATCHRequest = functools.partial(Request, method='PATCH')
|
||||
PUTRequest = functools.partial(Request, method='PUT')
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue