Python Request GET
https://www.w3schools.com/python/ref_requests_get.asp
import requests
# session = requests.session()
# response = session.get('https://w3schools.com/python/demopage.htm')
# print response.text
url = 'https://w3schools.com/python/demopage.htm'
a = requests.get(url)
print(a.text)
print(a.apparent_encoding)
print(a.content)
print(a.cookies)
print(a.elapsed)
print(a.encoding)
print(a.headers)
print(a.history)
print(a.is_permanent_redirect)
print(a.is_redirect)
print(a.iter_content())
for c in a.iter_content():
print(c)
print(a.iter_lines())
for c in a.iter_content():
print(c)
print(a.json())
print(a.links)
print(a.next)
print(a.ok)
print(a.raise_for_status())
print(a.reason)
print(a.request)
print(a.status_code)
print(a.text)
print(a.url)
a.close()
b = requests.get(url, cookies = {"favcolor": "Red"})
print(b.text)
c = requests.get(url, cert='folder/myclient.cert')
print(c.status_code)
d = requests.get(url, auth = ('user', 'pass'))
print(d.status_code)
e = requests.get(url, params = {"model": "Mustang"})
f = requests.get(url, headers = {"HTTP_HOST": "MyVeryOwnHost"})
print(f.text)
g = requests.get(url, proxies = { "https" : "https://1.1.0.1:80"})
print(g.text)
x = requests.get(url, stream=True)
print(x.status_code)
x = requests.get(url, timeout=0.001)
print(x.text)
x = requests.get(url, verify='folder/tlscertificate')
print(x.status_code)
x = requests.get(url, verify=False)
print(x.status_code)
print "========"
# x = requests.delete('https://w3schools.com/python/demopage.php')
# print(x.text)