summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFranek Magiera <framagie@gmail.com>2023-05-02 10:10:35 +0200
committerGitHub <noreply@github.com>2023-05-02 12:10:35 +0400
commit6351614959b6599fe53312223c972daba75a671f (patch)
tree821916ce8b79b4b94d8582f17ff59326b4b54d74
parent08237ad0729f4ec2e0bd093cf08e518025d2001d (diff)
downloadurllib3-6351614959b6599fe53312223c972daba75a671f.tar.gz
Show urllib3.request() in README (#3006)
Since version 2.0 a top level request method can be used for HTTP calls.
-rw-r--r--README.md3
1 files changed, 1 insertions, 2 deletions
diff --git a/README.md b/README.md
index 695ba416..27df7a1a 100644
--- a/README.md
+++ b/README.md
@@ -34,8 +34,7 @@ urllib3 is powerful and easy to use:
```python3
>>> import urllib3
->>> http = urllib3.PoolManager()
->>> resp = http.request("GET", "http://httpbin.org/robots.txt")
+>>> resp = urllib3.request("GET", "http://httpbin.org/robots.txt")
>>> resp.status
200
>>> resp.data