<reponame>yangwawa0323/Learning-Python-Networking-Second-Edition<gh_stars>10-100
#!/usr/bin/env python3

import urllib.request

url = input("Enter the URL:")

http_response = urllib.request.urlopen(url)

if http_response.code == 200:
	print(http_response.headers)
	for key,value in http_response.getheaders():
		print(key,value)
	
#!/usr/bin/env python3

import urllib.request

url = input("Enter the URL:")

http_response = urllib.request.urlopen(url)

if http_response.code == 200:
	print(http_response.headers)
	for key,value in http_response.getheaders():
		print(key,value)
#!/usr/bin/env python3