1 # Stubs for requests.api (Python 3)
\r
4 from typing import Optional, Union, Any, Iterable, Mapping, MutableMapping, Tuple, IO, Text
\r
6 from .models import Response
\r
8 if sys.version_info >= (3,):
\r
11 _Text = Union[str, Text]
\r
13 _ParamsMappingValueType = Union[_Text, bytes, int, float, Iterable[Union[_Text, bytes, int, float]]]
\r
18 MutableMapping[str, Any],
\r
19 MutableMapping[Text, Any],
\r
20 Iterable[Tuple[_Text, Optional[_Text]]],
\r
24 def request(method: str, url: str, **kwargs) -> Response: ...
\r
25 def get(url: Union[_Text, bytes],
\r
27 Union[Mapping[Union[_Text, bytes, int, float], _ParamsMappingValueType],
\r
28 Union[_Text, bytes],
\r
29 Tuple[Union[_Text, bytes, int, float], _ParamsMappingValueType],
\r
30 Mapping[_Text, _ParamsMappingValueType],
\r
31 Mapping[bytes, _ParamsMappingValueType],
\r
32 Mapping[int, _ParamsMappingValueType],
\r
33 Mapping[float, _ParamsMappingValueType]]] = ...,
\r
34 **kwargs) -> Response: ...
\r
35 def options(url: _Text, **kwargs) -> Response: ...
\r
36 def head(url: _Text, **kwargs) -> Response: ...
\r
37 def post(url: _Text, data: _Data=..., json=..., **kwargs) -> Response: ...
\r
38 def put(url: _Text, data: _Data=..., json=..., **kwargs) -> Response: ...
\r
39 def patch(url: _Text, data: _Data=..., json=..., **kwargs) -> Response: ...
\r
40 def delete(url: _Text, **kwargs) -> Response: ...
\r