You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
366 B

import requests
import os
# Configuration
ipAddress = '172.17.0.2' # A modifier
os.environ['NO_PROXY'] = ipAddress
data="GET /ADMIN"
byteLength = len(data.encode('utf-8'))
headers = {'Content-Length' : str(byteLength)}
url = 'http://' + ipAddress
response = requests.post(url, headers=headers, data=data)
print(response.raise_for_status)
print(response.content)