⚗️ add proxy support

This commit is contained in:
yanyongyu
2021-12-25 14:04:53 +08:00
parent e62ce93011
commit 188eb110c5
4 changed files with 16 additions and 5 deletions

View File

@ -70,6 +70,7 @@ class Request:
files: FilesTypes = None,
version: Union[str, HTTPVersion] = HTTPVersion.H11,
timeout: Optional[float] = None,
proxy: Optional[str] = None,
):
# method
self.method: str = (
@ -81,6 +82,8 @@ class Request:
self.version: HTTPVersion = HTTPVersion(version)
# timeout
self.timeout: Optional[float] = timeout
# proxy
self.proxy: Optional[str] = proxy
# url
if isinstance(url, tuple):