Merging headers in load_connection_args

pull/6026/head
faucct 5 years ago committed by GitHub
parent 935d6df839
commit 5ab8717fec
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -299,7 +299,13 @@ class GatewayClient(SingletonConfigurable):
if len(self._static_args) == 0:
self.init_static_args()
kwargs.update(self._static_args)
for arg, static_value in self._static_args.items():
if arg == 'headers':
given_value = kwargs.setdefault(arg, {})
if isinstance(given_value, dict):
given_value.update(static_value)
else:
kwargs[arg] = static_value
return kwargs

Loading…
Cancel
Save