You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2025-11-29 22:58:15 +02:00
add support for client SSL certificate and key
This commit is contained in:
@@ -73,6 +73,12 @@ def get_requests_kwargs(args):
|
||||
auth_plugin = plugin_manager.get_auth_plugin(args.auth_type)()
|
||||
credentials = auth_plugin.get_auth(args.auth.key, args.auth.value)
|
||||
|
||||
cert = None
|
||||
if args.ssl_cert:
|
||||
cert = args.ssl_cert
|
||||
if args.ssl_key:
|
||||
cert = (cert, args.ssl_key)
|
||||
|
||||
kwargs = {
|
||||
'stream': True,
|
||||
'method': args.method.lower(),
|
||||
@@ -83,6 +89,7 @@ def get_requests_kwargs(args):
|
||||
'yes': True,
|
||||
'no': False
|
||||
}.get(args.verify, args.verify),
|
||||
'cert': cert,
|
||||
'timeout': args.timeout,
|
||||
'auth': credentials,
|
||||
'proxies': dict((p.key, p.value) for p in args.proxy),
|
||||
|
||||
Reference in New Issue
Block a user