From a5c9093edca46c059165e88d26c0f9d7f58b80fe Mon Sep 17 00:00:00 2001 From: Han Song Date: Sun, 25 Feb 2018 22:19:35 -0800 Subject: [PATCH] Allow `requests.post` to accept `str` for `data`. (#1922) ```python import json url = 'https://api.github.com/some/endpoint' payload = {'some': 'data'} r = requests.post(url, data=json.dumps(payload)) ``` --- third_party/2and3/requests/api.pyi | 1 + 1 file changed, 1 insertion(+) diff --git a/third_party/2and3/requests/api.pyi b/third_party/2and3/requests/api.pyi index 0fe344ecf..391e40b9a 100644 --- a/third_party/2and3/requests/api.pyi +++ b/third_party/2and3/requests/api.pyi @@ -13,6 +13,7 @@ else: _ParamsMappingValueType = Union[_Text, bytes, int, float, Iterable[Union[_Text, bytes, int, float]]] _Data = Union[ None, + _Text, bytes, MutableMapping[str, str], MutableMapping[str, Text],