atlassian-python-api
atlassian-python-api copied to clipboard
Insight (Assets) class not correctly setting self.default_headers when cloud=True
from atlassian import Insight
import config
with open(config.api_token_file, 'r') as token_file:
api_user, api_pass = token_file.read().strip().split(':')
insight = Insight(
url=config.site_url,
username=api_user,
password=api_pass,
cloud=True)
print(insight.default_headers)
Outputs:
{'Accept': 'application/json'}
Should be:
{'Accept': 'application/json', 'Content-Type': 'application/json'}
hm, interesting as based on the base method all good https://github.com/atlassian-api/atlassian-python-api/blob/master/atlassian/rest_client.py#L23
self.default_headers = {"Accept": "application/json", "Content-Type": "application/json"}
return args, kwargs```