Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
Merge pull request #4 from UnitedIncome/status-codes
Browse files Browse the repository at this point in the history
Trying to add status codes
  • Loading branch information
mladlow committed Oct 30, 2018
2 parents 3a86fd3 + 178c843 commit eb0dd1c
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions destroyer-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,12 @@ def handle_auth_redirect():

print(options)
rsp = requests.get('https://slack.com/api/oauth.access', params=options)
print(rsp)
body = rsp.json()
print(body)
print(rsp)
print(rsp.content)
print(rsp.status_code)
print('headers:')
print(rsp.headers)
print(rsp.headers.items())
print('done headers')
return 'well we tried anyway'
if body['ok']:
return ('Hey, we got it!', 200, {'content-type': 'text/html'})
return ('Oh no we didnt get it', 401, {'content-type': 'text/html'})


if __name__ == '__main__':
Expand Down

0 comments on commit eb0dd1c

Please sign in to comment.