--- /dev/null
+from datetime import datetime\r
+from typing import (\r
+ Any, Callable, Iterable, Iterator, Mapping, MutableMapping, Optional, Sequence, Text, Tuple, Type, TypeVar, Union,\r
+)\r
+\r
+from wsgiref.types import WSGIEnvironment, InputStream\r
+\r
+from .datastructures import (\r
+ Authorization, CombinedMultiDict, EnvironHeaders, Headers, ImmutableMultiDict,\r
+ MultiDict, TypeConversionDict, HeaderSet,\r
+)\r
+\r
+class BaseRequest:\r
+ charset = ... # type: str\r
+ encoding_errors = ... # type: str\r
+ max_content_length = ... # type: int\r
+ max_form_memory_size = ... # type: int\r
+ parameter_storage_class = ... # type: Type\r
+ list_storage_class = ... # type: Type\r
+ dict_storage_class = ... # type: Type\r
+ form_data_parser_class = ... # type: Type\r
+ trusted_hosts = ... # type: Optional[Sequence[Text]]\r
+ disable_data_descriptor = ... # type: Any\r
+ environ: WSGIEnvironment = ...\r
+ shallow = ... # type: Any\r
+ def __init__(self, environ: WSGIEnvironment, populate_request: bool = ..., shallow: bool = ...) -> None: ...\r
+ @property\r
+ def url_charset(self) -> str: ...\r
+ @classmethod\r
+ def from_values(cls, *args, **kwargs) -> 'BaseRequest': ...\r
+ @classmethod\r
+ def application(cls, f): ...\r
+ @property\r
+ def want_form_data_parsed(self): ...\r
+ def make_form_data_parser(self): ...\r
+ def close(self) -> None: ...\r
+ def __enter__(self): ...\r
+ def __exit__(self, exc_type, exc_value, tb): ...\r
+ @property\r
+ def stream(self) -> InputStream: ...\r
+ input_stream: InputStream\r
+ args = ... # type: ImmutableMultiDict\r
+ @property\r
+ def data(self) -> bytes: ...\r
+ def get_data(self, cache: bool = ..., as_text: bool = ..., parse_form_data: bool = ...) -> bytes: ...\r
+ form = ... # type: ImmutableMultiDict\r
+ values = ... # type: CombinedMultiDict\r
+ files = ... # type: MultiDict\r
+ cookies = ... # type: TypeConversionDict\r
+ headers = ... # type: EnvironHeaders\r
+ path = ... # type: Text\r
+ full_path = ... # type: Text\r
+ script_root = ... # type: Text\r
+ url = ... # type: Text\r
+ base_url = ... # type: Text\r
+ url_root = ... # type: Text\r
+ host_url = ... # type: Text\r
+ host = ... # type: Text\r
+ query_string = ... # type: bytes\r
+ method = ... # type: Text\r
+ def access_route(self): ...\r
+ @property\r
+ def remote_addr(self) -> str: ...\r
+ remote_user = ... # type: Text\r
+ scheme = ... # type: str\r
+ is_xhr = ... # type: bool\r
+ is_secure = ... # type: bool\r
+ is_multithread = ... # type: bool\r
+ is_multiprocess = ... # type: bool\r
+ is_run_once = ... # type: bool\r
+\r
+_OnCloseT = TypeVar('_OnCloseT', bound=Callable[[], Any])\r
+_SelfT = TypeVar('_SelfT', bound=BaseResponse)\r
+\r
+class BaseResponse:\r
+ charset = ... # type: str\r
+ default_status = ... # type: int\r
+ default_mimetype = ... # type: str\r
+ implicit_sequence_conversion = ... # type: bool\r
+ autocorrect_location_header = ... # type: bool\r
+ automatically_set_content_length = ... # type: bool\r
+ headers = ... # type: Headers\r
+ status_code = ... # type: int\r
+ status = ... # type: str\r
+ direct_passthrough = ... # type: bool\r
+ response = ... # type: Iterable[bytes]\r
+ def __init__(self, response: Optional[Union[str, bytes, bytearray, Iterable[str], Iterable[bytes]]] = ...,\r
+ status: Optional[Union[Text, int]] = ...,\r
+ headers: Optional[Union[Headers,\r
+ Mapping[Text, Text],\r
+ Sequence[Tuple[Text, Text]]]] = ...,\r
+ mimetype: Optional[Text] = ...,\r
+ content_type: Optional[Text] = ...,\r
+ direct_passthrough: bool = ...) -> None: ...\r
+ def call_on_close(self, func: _OnCloseT) -> _OnCloseT: ...\r
+ @classmethod\r
+ def force_type(cls: Type[_SelfT], response: object, environ: Optional[WSGIEnvironment] = ...) -> _SelfT: ...\r
+ @classmethod\r
+ def from_app(cls: Type[_SelfT], app: Any, environ: WSGIEnvironment, buffered: bool = ...) -> _SelfT: ...\r
+ def get_data(self, as_text: bool = ...) -> Any: ... # returns bytes if as_text is False (the default), else Text\r
+ def set_data(self, value: Union[bytes, Text]) -> None: ...\r
+ data = ... # type: Any\r
+ def calculate_content_length(self) -> Optional[int]: ...\r
+ def make_sequence(self) -> None: ...\r
+ def iter_encoded(self) -> Iterator[bytes]: ...\r
+ def set_cookie(self, key, value='', max_age=None, expires=None, path='', domain=None, secure=False, httponly=False): ...\r
+ def delete_cookie(self, key, path='', domain=None): ...\r
+ @property\r
+ def is_streamed(self) -> bool: ...\r
+ @property\r
+ def is_sequence(self) -> bool: ...\r
+ def close(self) -> None: ...\r
+ def __enter__(self): ...\r
+ def __exit__(self, exc_type, exc_value, tb): ...\r
+ # The no_etag argument if fictional, but required for compatibility with\r
+ # ETagResponseMixin\r
+ def freeze(self, no_etag: bool = ...) -> None: ...\r
+ def get_wsgi_headers(self, environ): ...\r
+ def get_app_iter(self, environ): ...\r
+ def get_wsgi_response(self, environ): ...\r
+ def __call__(self, environ, start_response): ...\r
+\r
+class AcceptMixin:\r
+ def accept_mimetypes(self): ...\r
+ def accept_charsets(self): ...\r
+ def accept_encodings(self): ...\r
+ def accept_languages(self): ...\r
+\r
+class ETagRequestMixin:\r
+ def cache_control(self): ...\r
+ def if_match(self): ...\r
+ def if_none_match(self): ...\r
+ def if_modified_since(self): ...\r
+ def if_unmodified_since(self): ...\r
+ def if_range(self): ...\r
+ def range(self): ...\r
+\r
+class UserAgentMixin:\r
+ def user_agent(self): ...\r
+\r
+class AuthorizationMixin:\r
+ @property\r
+ def authorization(self) -> Optional[Authorization]: ...\r
+\r
+class StreamOnlyMixin:\r
+ disable_data_descriptor = ... # type: Any\r
+ want_form_data_parsed = ... # type: Any\r
+\r
+class ETagResponseMixin:\r
+ @property\r
+ def cache_control(self): ...\r
+ status_code = ... # type: Any\r
+ def make_conditional(self, request_or_environ, accept_ranges=False, complete_length=None): ...\r
+ def add_etag(self, overwrite=False, weak=False): ...\r
+ def set_etag(self, etag, weak=False): ...\r
+ def get_etag(self): ...\r
+ def freeze(self, no_etag: bool = ...) -> None: ...\r
+ accept_ranges = ... # type: Any\r
+ content_range = ... # type: Any\r
+\r
+class ResponseStream:\r
+ mode = ... # type: Any\r
+ response = ... # type: Any\r
+ closed = ... # type: Any\r
+ def __init__(self, response): ...\r
+ def write(self, value): ...\r
+ def writelines(self, seq): ...\r
+ def close(self): ...\r
+ def flush(self): ...\r
+ def isatty(self): ...\r
+ @property\r
+ def encoding(self): ...\r
+\r
+class ResponseStreamMixin:\r
+ @property\r
+ def stream(self) -> ResponseStream: ...\r
+\r
+class CommonRequestDescriptorsMixin:\r
+ @property\r
+ def content_type(self) -> Optional[str]: ...\r
+ @property\r
+ def content_length(self) -> Optional[int]: ...\r
+ @property\r
+ def content_encoding(self) -> Optional[str]: ...\r
+ @property\r
+ def content_md5(self) -> Optional[str]: ...\r
+ @property\r
+ def referrer(self) -> Optional[str]: ...\r
+ @property\r
+ def date(self) -> Optional[datetime]: ...\r
+ @property\r
+ def max_forwards(self) -> Optional[int]: ...\r
+ @property\r
+ def mimetype(self) -> str: ...\r
+ @property\r
+ def mimetype_params(self) -> Mapping[str, str]: ...\r
+ @property\r
+ def pragma(self) -> HeaderSet: ...\r
+\r
+class CommonResponseDescriptorsMixin:\r
+ mimetype: Optional[str] = ...\r
+ @property\r
+ def mimetype_params(self) -> MutableMapping[str, str]: ...\r
+ location: Optional[str] = ...\r
+ age: Any = ... # get: Optional[datetime.timedelta]\r
+ content_type: Optional[str] = ...\r
+ content_length: Optional[int] = ...\r
+ content_location: Optional[str] = ...\r
+ content_encoding: Optional[str] = ...\r
+ content_md5: Optional[str] = ...\r
+ date: Any = ... # get: Optional[datetime.datetime]\r
+ expires: Any = ... # get: Optional[datetime.datetime]\r
+ last_modified: Any = ... # get: Optional[datetime.datetime]\r
+ retry_after: Any = ... # get: Optional[datetime.datetime]\r
+ vary: Optional[str] = ...\r
+ content_language: Optional[str] = ...\r
+ allow: Optional[str] = ...\r
+\r
+class WWWAuthenticateMixin:\r
+ @property\r
+ def www_authenticate(self): ...\r
+\r
+class Request(BaseRequest, AcceptMixin, ETagRequestMixin, UserAgentMixin, AuthorizationMixin, CommonRequestDescriptorsMixin): ...\r
+class PlainRequest(StreamOnlyMixin, Request): ...\r
+class Response(BaseResponse, ETagResponseMixin, ResponseStreamMixin, CommonResponseDescriptorsMixin, WWWAuthenticateMixin): ...\r