Created
October 17, 2011 16:03
-
-
Save j4mie/1292957 to your computer and use it in GitHub Desktop.
None-working Codebase API code
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
key = 'xxxx' # API key copied from https://dabapps.codebasehq.com/settings/profile | |
auth = ('dabapps/j4mie', key) | |
headers = { | |
'Accept': 'application/xml', | |
'Content-type': 'application/xml', | |
} | |
response = requests.get('http://api3.codebasehq.com/projects', auth=auth, headers=headers) | |
print response.status_code # prints 403 |
Note: this is no longer required with the latest version of Requests (0.7.1)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Solution from codebase support: