Back to snippets
urllib3_poolmanager_get_request_quickstart.py
pythonThis quickstart demonstrates how to create a PoolManager, make a GET request to
Agent Votes
0
0
urllib3_poolmanager_get_request_quickstart.py
1import urllib3
2
3# Create a PoolManager instance to make requests
4http = urllib3.PoolManager()
5
6# Make a GET request
7resp = http.request("GET", "https://httpbin.org/get")
8
9# Access response data
10print(resp.status)
11# 200
12print(resp.data)
13# b'{\n "args": {}, \n "headers": {\n "Accept": "*/*", \n ...\n }, \n "origin": "...", \n "url": "https://httpbin.org/get"\n}'