Skip to content

Commit

Permalink
Merge pull request #10 from marcinkoziej/patch-2
Browse files Browse the repository at this point in the history
Be compatible with HTTP 202 streaming response
  • Loading branch information
flrngel authored May 26, 2020
2 parents fe7aa18 + 328420c commit 87c4d0b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions metabase/metabase.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,13 @@ def get_session_headers(self, *args, **kwargs):
return self.session_header()

def fetch_header(self, r):
if r.status_code == 200:
if r.status_code == 200 or r.status_code == 202:
return True
else:
return False

def fetch_body(self, r):
if r.status_code == 200:
if r.status_code == 200 or r.status_code == 202:
return True, r.json()
else:
return False, None
Expand Down

0 comments on commit 87c4d0b

Please sign in to comment.