Allow to set cookie in python(3) API constructor.

This commit is contained in:
Ondrej Novy
2015-07-24 11:45:36 +02:00
parent cde8d7ba4c
commit 50736458d0
2 changed files with 4 additions and 4 deletions

View File

@@ -45,13 +45,13 @@ class ApiClient(object):
: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):
header_name=None, header_value=None, cookie=None):
self.default_headers = {}
if header_name is not None:
self.default_headers[header_name] = header_value
self.host = host
self.cookie = None
self.cookie = cookie
# Set default User-Agent.
self.user_agent = 'Python-Swagger'