Skip to content

Commit 67549c5

Browse files
authored
Merge pull request #15 from kurtdevos/master
Fix KeyError 'content-type'
2 parents 3f61982 + 8e76579 commit 67549c5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

microsoftgraph/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ def _request(self, method, url, headers=None, **kwargs):
618618

619619
def _parse(self, response):
620620
status_code = response.status_code
621-
if 'application/json' in response.headers['Content-Type']:
621+
if 'application/json' in response.headers.get('Content-Type', ''):
622622
r = response.json()
623623
else:
624624
r = response.content

0 commit comments

Comments
 (0)