mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-01-22 11:02:07 +08:00
requests: Allow bytes for url parameters. (#3209)
typeshed already partially reflected https://github.com/psf/requests/pull/2238 but not completely.
This commit is contained in:
committed by
Michael J. Sullivan
parent
a48abb4546
commit
f53f52de57
12
third_party/2and3/requests/api.pyi
vendored
12
third_party/2and3/requests/api.pyi
vendored
@@ -32,9 +32,9 @@ def get(url: Union[_Text, bytes],
|
||||
Mapping[int, _ParamsMappingValueType],
|
||||
Mapping[float, _ParamsMappingValueType]]] = ...,
|
||||
**kwargs) -> Response: ...
|
||||
def options(url: _Text, **kwargs) -> Response: ...
|
||||
def head(url: _Text, **kwargs) -> Response: ...
|
||||
def post(url: _Text, data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def put(url: _Text, data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def patch(url: _Text, data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def delete(url: _Text, **kwargs) -> Response: ...
|
||||
def options(url: Union[_Text, bytes], **kwargs) -> Response: ...
|
||||
def head(url: Union[_Text, bytes], **kwargs) -> Response: ...
|
||||
def post(url: Union[_Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def put(url: Union[_Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def patch(url: Union[_Text, bytes], data: _Data = ..., json=..., **kwargs) -> Response: ...
|
||||
def delete(url: Union[_Text, bytes], **kwargs) -> Response: ...
|
||||
|
||||
2
third_party/2and3/requests/sessions.pyi
vendored
2
third_party/2and3/requests/sessions.pyi
vendored
@@ -79,7 +79,7 @@ class Session(SessionRedirectMixin):
|
||||
def __enter__(self) -> Session: ...
|
||||
def __exit__(self, *args) -> None: ...
|
||||
def prepare_request(self, request): ...
|
||||
def request(self, method: str, url: str,
|
||||
def request(self, method: str, url: Union[str, bytes, Text],
|
||||
params: Union[None, bytes, MutableMapping[Text, Text]] = ...,
|
||||
data: _Data = ...,
|
||||
headers: Optional[MutableMapping[Text, Text]] = ...,
|
||||
|
||||
Reference in New Issue
Block a user