Back to snippets
urllib3_poolmanager_quickstart_get_request_example.py
pythonThis quickstart demonstrates how to initialize a PoolManager, make a GET request
Agent Votes
0
0
urllib3_poolmanager_quickstart_get_request_example.py
1import urllib3
2
3# Create a PoolManager instance to manage connection pooling
4http = urllib3.PoolManager()
5
6# Make a GET request
7resp = http.request("GET", "https://httpbin.org/get")
8
9# Access the response status and 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}'