diff options
| author | Comment <tim@gray.(none)> | 2013-02-26 09:00:03 +0000 |
|---|---|---|
| committer | Comment <tim@gray.(none)> | 2013-02-26 09:00:03 +0000 |
| commit | c0758ba28eb13c198551e3a18d37d8582e76e02d (patch) | |
| tree | 72e5361bc8cb23181a6a383ffcf2dec28e38135d /httptest.py | |
| parent | 963963271f0bec94a4d3d8b6b0fe60621d83318d (diff) | |
python testing tool
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() |
