|
What this is
Other links
The source code
import sys
import httplib
if ( len(sys.argv) != 5 ):
print "usage tinyWebClient.py [host] [port] [method] [path]"
else:
host = sys.argv[1]
port = sys.argv[2]
method = sys.argv[3]
path = sys.argv[4]
info = (host, port)
print("%s:%s" % info)
conn = httplib.HTTPConnection("%s:%s" % info)
conn.request(method, path)
print(conn.getresponse().msg)
|
| ... this post is sponsored by my books ... | |
#1 New Release! |
FP Best Seller |
Copyright 1998-2024 Alvin Alexander, alvinalexander.com
All Rights Reserved.
A percentage of advertising revenue from
pages under the /java/jwarehouse
URI on this website is
paid back to open source projects.