From 508021e8347ce6381a9290325238ee89f1e829f1 Mon Sep 17 00:00:00 2001 From: Comment Date: Wed, 27 Feb 2013 19:47:58 +0000 Subject: testing util --- http | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100755 http (limited to 'http') diff --git a/http b/http new file mode 100755 index 0000000..0ff512d --- /dev/null +++ b/http @@ -0,0 +1,11 @@ +#!/usr/bin/python +import httplib +import argparse +parser = argparse.ArgumentParser() +parser.add_argument("method",default="GET",nargs='?') +parser.add_argument("path",default="/",nargs='?') +parser.add_argument("body",default="body",nargs='?') +args=parser.parse_args() +connection = httplib.HTTPConnection('127.0.0.1:9000') +connection.request(args.method, args.path, args.body) +print connection.getresponse().read() \ No newline at end of file -- cgit v1.2.3