mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-06 18:45:23 +00:00
Merge pull request #1803 from Tengah/issue-1802
Fixed configuration of host in api_client so that it gets done at run-time not load-time
This commit is contained in:
commit
dee885e9f5
@ -66,8 +66,7 @@ class ApiClient(object):
|
||||
:param header_name: a header to pass when making calls to the API.
|
||||
:param header_value: a header value to pass when making calls to the API.
|
||||
"""
|
||||
def __init__(self, host=Configuration().host,
|
||||
header_name=None, header_value=None, cookie=None):
|
||||
def __init__(self, host=None, header_name=None, header_value=None, cookie=None):
|
||||
|
||||
"""
|
||||
Constructor of the class.
|
||||
@ -76,7 +75,10 @@ class ApiClient(object):
|
||||
self.default_headers = {}
|
||||
if header_name is not None:
|
||||
self.default_headers[header_name] = header_value
|
||||
self.host = host
|
||||
if host is None:
|
||||
self.host = Configuration().host
|
||||
else:
|
||||
self.host = host
|
||||
self.cookie = cookie
|
||||
# Set default User-Agent.
|
||||
self.user_agent = 'Python-Swagger/{{packageVersion}}'
|
||||
|
Loading…
Reference in New Issue
Block a user