usenetbinary-newsreaderquickboxtraktkodistabletvshowsqnaptautullifanartsickbeardtvseriesplexswizzinembyseedboxtvdbnzbgetsubtitlewebui
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
5.1 KiB
106 lines
5.1 KiB
# Stubs for tornado_py3.httpclient (Python 3)
|
|
#
|
|
# NOTE: This dynamically typed stub was automatically generated by stubgen.
|
|
|
|
import datetime
|
|
import ssl
|
|
from io import BytesIO
|
|
from tornado_py3 import httputil
|
|
from tornado_py3.concurrent import Future
|
|
from tornado_py3.util import Configurable
|
|
from typing import Any, Callable, Dict, Optional, Type, Union
|
|
|
|
class HTTPClient:
|
|
def __init__(self, async_client_class: Optional[Type[AsyncHTTPClient]]=..., **kwargs: Any) -> None: ...
|
|
def __del__(self) -> None: ...
|
|
def close(self) -> None: ...
|
|
def fetch(self, request: Union[HTTPRequest, str], **kwargs: Any) -> HTTPResponse: ...
|
|
|
|
class AsyncHTTPClient(Configurable):
|
|
@classmethod
|
|
def configurable_base(cls: Any) -> Type[Configurable]: ...
|
|
@classmethod
|
|
def configurable_default(cls: Any) -> Type[Configurable]: ...
|
|
def __new__(cls: Any, force_instance: bool=..., **kwargs: Any) -> AsyncHTTPClient: ...
|
|
io_loop: Any = ...
|
|
defaults: Any = ...
|
|
def initialize(self, defaults: Optional[Dict[str, Any]]=...) -> None: ...
|
|
def close(self) -> None: ...
|
|
def fetch(self, request: Union[str, HTTPRequest], raise_error: bool=..., **kwargs: Any) -> Future[HTTPResponse]: ...
|
|
def fetch_impl(self, request: HTTPRequest, callback: Callable[[HTTPResponse], None]) -> None: ...
|
|
@classmethod
|
|
def configure(cls: Any, impl: Union[None, str, Type[Configurable]], **kwargs: Any) -> None: ...
|
|
|
|
class HTTPRequest:
|
|
headers: Any = ...
|
|
proxy_host: Any = ...
|
|
proxy_port: Any = ...
|
|
proxy_username: Any = ...
|
|
proxy_password: Any = ...
|
|
proxy_auth_mode: Any = ...
|
|
url: Any = ...
|
|
method: Any = ...
|
|
body: Any = ...
|
|
body_producer: Any = ...
|
|
auth_username: Any = ...
|
|
auth_password: Any = ...
|
|
auth_mode: Any = ...
|
|
connect_timeout: Any = ...
|
|
request_timeout: Any = ...
|
|
follow_redirects: Any = ...
|
|
max_redirects: Any = ...
|
|
user_agent: Any = ...
|
|
decompress_response: Any = ...
|
|
network_interface: Any = ...
|
|
streaming_callback: Any = ...
|
|
header_callback: Any = ...
|
|
prepare_curl_callback: Any = ...
|
|
allow_nonstandard_methods: Any = ...
|
|
validate_cert: Any = ...
|
|
ca_certs: Any = ...
|
|
allow_ipv6: Any = ...
|
|
client_key: Any = ...
|
|
client_cert: Any = ...
|
|
ssl_options: Any = ...
|
|
expect_100_continue: Any = ...
|
|
start_time: Any = ...
|
|
def __init__(self, url: str, method: str=..., headers: Optional[Union[Dict[str, str], httputil.HTTPHeaders]]=..., body: Optional[Union[bytes, str]]=..., auth_username: Optional[str]=..., auth_password: Optional[str]=..., auth_mode: Optional[str]=..., connect_timeout: Optional[float]=..., request_timeout: Optional[float]=..., if_modified_since: Optional[Union[float, datetime.datetime]]=..., follow_redirects: Optional[bool]=..., max_redirects: Optional[int]=..., user_agent: Optional[str]=..., use_gzip: Optional[bool]=..., network_interface: Optional[str]=..., streaming_callback: Optional[Callable[[bytes], None]]=..., header_callback: Optional[Callable[[str], None]]=..., prepare_curl_callback: Optional[Callable[[Any], None]]=..., proxy_host: Optional[str]=..., proxy_port: Optional[int]=..., proxy_username: Optional[str]=..., proxy_password: Optional[str]=..., proxy_auth_mode: Optional[str]=..., allow_nonstandard_methods: Optional[bool]=..., validate_cert: Optional[bool]=..., ca_certs: Optional[str]=..., allow_ipv6: Optional[bool]=..., client_key: Optional[str]=..., client_cert: Optional[str]=..., body_producer: Optional[Callable[[Callable[[bytes], None]], Future[None]]]=..., expect_100_continue: bool=..., decompress_response: Optional[bool]=..., ssl_options: Optional[Union[Dict[str, Any], ssl.SSLContext]]=...) -> None: ...
|
|
@property
|
|
def headers(self) -> httputil.HTTPHeaders: ...
|
|
@headers.setter
|
|
def headers(self, value: Union[Dict[str, str], httputil.HTTPHeaders]) -> None: ...
|
|
@property
|
|
def body(self) -> bytes: ...
|
|
@body.setter
|
|
def body(self, value: Union[bytes, str]) -> None: ...
|
|
|
|
class HTTPResponse:
|
|
error: Optional[BaseException] = ...
|
|
request: HTTPRequest = ...
|
|
code: Any = ...
|
|
reason: Any = ...
|
|
headers: Any = ...
|
|
buffer: Any = ...
|
|
effective_url: Any = ...
|
|
start_time: Any = ...
|
|
request_time: Any = ...
|
|
time_info: Any = ...
|
|
def __init__(self, request: HTTPRequest, code: int, headers: Optional[httputil.HTTPHeaders]=..., buffer: Optional[BytesIO]=..., effective_url: Optional[str]=..., error: Optional[BaseException]=..., request_time: Optional[float]=..., time_info: Optional[Dict[str, float]]=..., reason: Optional[str]=..., start_time: Optional[float]=...) -> None: ...
|
|
@property
|
|
def body(self) -> bytes: ...
|
|
def rethrow(self) -> None: ...
|
|
|
|
class HTTPClientError(Exception):
|
|
code: Any = ...
|
|
message: Any = ...
|
|
response: Any = ...
|
|
def __init__(self, code: int, message: Optional[str]=..., response: Optional[HTTPResponse]=...) -> None: ...
|
|
HTTPError = HTTPClientError
|
|
|
|
class _RequestProxy:
|
|
request: Any = ...
|
|
defaults: Any = ...
|
|
def __init__(self, request: HTTPRequest, defaults: Optional[Dict[str, Any]]) -> None: ...
|
|
def __getattr__(self, name: str) -> Any: ...
|
|
|
|
def main() -> None: ...
|
|
|