Skip to content

Commit

Permalink
Unable to login as desktop if you change the Content-type
Browse files Browse the repository at this point in the history
  • Loading branch information
Doug Blank committed Jun 8, 2015
1 parent a32634e commit 42fe3e9
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions familysearch/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,9 +166,10 @@ def _request(self, url, data=None, headers=None, method=None, nojson=False):
pass
request = Request(url, data, headers, method=method)
if not nojson:
if method is not "GET":
request.add_header('Content-Type', 'application/x-fs-v1+json')
request.add_header('Accept', 'application/json')
if method is not "GET" and "Content-type" not in request.headers:
request.add_header('Content-type', 'application/x-fs-v1+json')
if 'Accept' not in request.headers:
request.add_header('Accept', 'application/json')
if self.logged_in and not self.cookies:
# Add sessionId parameter to url if cookie is not set
request.add_header('Authorization', 'Bearer ' + self.access_token)
Expand Down

0 comments on commit 42fe3e9

Please sign in to comment.