mirror of
https://github.com/httpie/cli.git
synced 2025-07-01 06:40:52 +02:00
Allow multiple fields with the same name.
Applies to form data and URL params: http -f url a=1 a=2 http url a==1 a==2
This commit is contained in:
@ -37,10 +37,10 @@ def get_response(args):
|
||||
try:
|
||||
credentials = None
|
||||
if args.auth:
|
||||
auth_type = (requests.auth.HTTPDigestAuth
|
||||
if args.auth_type == 'digest'
|
||||
else requests.auth.HTTPBasicAuth)
|
||||
credentials = auth_type(args.auth.key, args.auth.value)
|
||||
credentials = {
|
||||
'basic': requests.auth.HTTPBasicAuth,
|
||||
'digest': requests.auth.HTTPDigestAuth,
|
||||
}[args.auth_type](args.auth.key, args.auth.value)
|
||||
|
||||
return requests.request(
|
||||
method=args.method.lower(),
|
||||
|
Reference in New Issue
Block a user