# Various Request Operations
from http.client import HTTPConnection
# Read contents of a generic URL GET Response
print('Generic GET Connection Response')
print('www.mikedinder.com')
conn = HTTPConnection('www.mikedinder.com')
conn.request('GET', '/')
result = conn.getresponse()
contents = result.read()
print(contents)
print('www.amazon.com')
conn = HTTPConnection('www.amazon.com')
conn.request('GET', '/')
result = conn.getresponse()
contents = result.read()
print(contents)
print('www.google.com')
conn = HTTPConnection('www.google.com')
conn.request('GET', '/')
result = conn.getresponse()
contents = result.read()
# print(contents)
print('--------------------------------------------------')
Runs the entire script above. Open your Console Window in Inspect Code to view the output of the script above.
A prompt popup will ask you for various input() commands.
Client-side execution via Pyodide · No server · Full stdlib · numpy, pandas, matplotlib available via micropip
Mobile users will want to use this method. Copy snippets or the entire script from above. You may also copy this script exactly as it is shown and you can run it on your own machine using the Command-Line Interface (CLI).