This commit is contained in:
Maxim Kurnikov
2019-02-05 16:09:42 +03:00
parent be0b2eebb2
commit e4d2b795e3
6 changed files with 38 additions and 23 deletions

View File

@@ -13,11 +13,12 @@ from django.urls import ResolverMatch
class BadHeaderError(ValueError): ...
class HttpResponseBase(BytesIO):
class HttpResponseBase:
status_code: int = ...
cookies: SimpleCookie = ...
reason_phrase: str = ...
charset: str = ...
closed: bool = ...
def __init__(
self,
content_type: Optional[str] = ...,
@@ -51,6 +52,15 @@ class HttpResponseBase(BytesIO):
def set_signed_cookie(self, key: str, value: str, salt: str = "", **kwargs: Any) -> None: ...
def delete_cookie(self, key: str, path: str = "", domain: str = None) -> None: ...
def make_bytes(self, value: object) -> bytes: ...
def close(self) -> None: ...
def write(self, content: Union[str, bytes]) -> None: ...
def flush(self) -> None: ...
def tell(self) -> int: ...
def readable(self) -> bool: ...
def seekable(self) -> bool: ...
def writable(self) -> bool: ...
def writelines(self, lines: Iterable[object]): ...
def __iter__(self) -> Iterator[bytes]: ...
class HttpResponse(HttpResponseBase):
client: Client
@@ -73,7 +83,6 @@ class HttpResponse(HttpResponseBase):
def content(self) -> bytes: ...
@content.setter
def content(self, value: Any) -> None: ...
def tell(self) -> int: ...
@property
def url(self) -> str: ...
def json(self) -> Dict[str, Any]: ...