mirror of
https://github.com/httpie/cli.git
synced 2024-11-28 08:38:44 +02:00
make --verify no command line argument work
This commit is contained in:
parent
1c5fd18465
commit
71d21d1feb
@ -131,6 +131,13 @@ def main(args=None,
|
|||||||
elif not files and 'Content-Type' not in headers:
|
elif not files and 'Content-Type' not in headers:
|
||||||
headers['Content-Type'] = TYPE_FORM
|
headers['Content-Type'] = TYPE_FORM
|
||||||
|
|
||||||
|
if args.verify == 'yes':
|
||||||
|
verify = True
|
||||||
|
elif args.verify == 'no':
|
||||||
|
verify = False
|
||||||
|
else:
|
||||||
|
verify = args.verify
|
||||||
|
|
||||||
# Fire the request.
|
# Fire the request.
|
||||||
try:
|
try:
|
||||||
response = requests.request(
|
response = requests.request(
|
||||||
@ -138,7 +145,7 @@ def main(args=None,
|
|||||||
url=args.url if '://' in args.url else 'http://%s' % args.url,
|
url=args.url if '://' in args.url else 'http://%s' % args.url,
|
||||||
headers=headers,
|
headers=headers,
|
||||||
data=data,
|
data=data,
|
||||||
verify=True if args.verify == 'yes' else args.verify,
|
verify=verify,
|
||||||
timeout=args.timeout,
|
timeout=args.timeout,
|
||||||
auth=(args.auth.key, args.auth.value) if args.auth else None,
|
auth=(args.auth.key, args.auth.value) if args.auth else None,
|
||||||
proxies=dict((p.key, p.value) for p in args.proxy),
|
proxies=dict((p.key, p.value) for p in args.proxy),
|
||||||
|
Loading…
Reference in New Issue
Block a user