Skip to content

Commit 1db22e6

Browse files
committed
update doc
1 parent a82be4a commit 1db22e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

doc.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1944,7 +1944,7 @@ True
19441944
```python
19451945

19461946
>>> import time
1947-
>>> r = req.get("https://postman-echo.com/get?a=2", timeout=3, params={"b": "3"})
1947+
>>> r = req.get("https://postman-echo.com/get?a=2", headers={"User-Agent": "Chrome"}, timeout=3, params={"b": "3"})
19481948
>>> r.url
19491949
'https://postman-echo.com/get?a=2&b=3'
19501950
>>> r.ok
@@ -1953,12 +1953,12 @@ True
19531953
200
19541954
>>> r.text.startswith('{')
19551955
True
1956-
>>> r = req.post("https://postman-echo.com/post?a=2", timeout=3, params={"b": "3"}, data=b"mock data")
1956+
>>> r = req.post("https://postman-echo.com/post?a=2", headers={"User-Agent": "Chrome"}, timeout=3, params={"b": "3"}, data=b"mock data")
19571957
>>> r.json()["data"]
19581958
'mock data'
19591959
>>> r.json()["args"]
19601960
{'a': '2', 'b': '3'}
1961-
>>> r = req.post("https://postman-echo.com/post?a=2", timeout=3, json={"data": "yes json"})
1961+
>>> r = req.post("https://postman-echo.com/post?a=2", headers={"User-Agent": "Chrome"}, timeout=3, json={"data": "yes json"})
19621962
>>> r.json()["json"]
19631963
{'data': 'yes json'}
19641964

0 commit comments

Comments
 (0)