diff options
Diffstat (limited to 'httptest.py')
| -rwxr-xr-x | httptest.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/httptest.py b/httptest.py new file mode 100755 index 0000000..3528741 --- /dev/null +++ b/httptest.py @@ -0,0 +1,11 @@ +#!/usr/bin/python +import httplib +import argparse +parser = argparse.ArgumentParser() +parser.add_argument("method") +parser.add_argument("path") +parser.add_argument("body") +args=parser.parse_args() +connection = httplib.HTTPConnection('127.0.0.1:9000') +connection.request(args.method, args.path, args.body) +print connection.getresponse().read() |
