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))
```
This commit is contained in:
Han Song
2018-02-25 22:19:35 -08:00
committed by Jelle Zijlstra
parent 61e63293f1
commit a5c9093edc

View File

@@ -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],