summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
authorTim Redfern <tim@herge.(none)>2013-06-25 19:42:30 +0100
committerTim Redfern <tim@herge.(none)>2013-06-25 19:42:30 +0100
commit1daee727f5d47681a73417a469d71673e1a0827c (patch)
tree4183a04deb54a69a07d73d2ea38f61cb39ab62d3 /http
parentf191b170379e5ae7f237aa2f7adae5f387caaa35 (diff)
pesky youtube movies
Diffstat (limited to 'http')
-rwxr-xr-xhttp3
1 files changed, 2 insertions, 1 deletions
diff --git a/http b/http
index 0c0314f..39a285b 100755
--- a/http
+++ b/http
@@ -5,8 +5,9 @@ parser = argparse.ArgumentParser()
parser.add_argument("method",default="GET",nargs='?')
parser.add_argument("path",default="/",nargs='?')
parser.add_argument("body",default="body",nargs='?')
+parser.add_argument("ip",default="127.0.0.1:9000",nargs='?')
args=parser.parse_args()
-connection = httplib.HTTPConnection('127.0.0.1:9000')
+connection = httplib.HTTPConnection(args.ip)
connection.request(args.method, args.path, args.body)
print connection.getresponse().read()