From 71d21d1feb831e58080947e570b417fde08e0267 Mon Sep 17 00:00:00 2001 From: "Matthew M. Boedicker" Date: Thu, 5 Apr 2012 12:55:05 -0400 Subject: [PATCH] make --verify no command line argument work --- httpie/__main__.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/httpie/__main__.py b/httpie/__main__.py index cd9e2de6..ec3c5cd0 100644 --- a/httpie/__main__.py +++ b/httpie/__main__.py @@ -131,6 +131,13 @@ def main(args=None, elif not files and 'Content-Type' not in headers: headers['Content-Type'] = TYPE_FORM + if args.verify == 'yes': + verify = True + elif args.verify == 'no': + verify = False + else: + verify = args.verify + # Fire the request. try: response = requests.request( @@ -138,7 +145,7 @@ def main(args=None, url=args.url if '://' in args.url else 'http://%s' % args.url, headers=headers, data=data, - verify=True if args.verify == 'yes' else args.verify, + verify=verify, timeout=args.timeout, auth=(args.auth.key, args.auth.value) if args.auth else None, proxies=dict((p.key, p.value) for p in args.proxy),