I'm trying to send a request to parse.com's REST API. According to parse's documentation I need to put the App ID and API Key on the request.
I tried to do this using slumber but I keep getting Client Error 401: http://api.parse.com/1/installations/
What is the proper way to add headers to slumber? I tried following the docs http://slumber.readthedocs.org/en/latest/options.html#custom-session-objects but it seems to be outdated and even after some modifications, it still didn't work.
For reference, here is my code:
session = requests.Session()
session.headers = {"X-Parse-Application-Id": APPLICATION_ID, "X-Parse-REST-API-Key": API_KEY}
api = slumber.API("http://api.parse.com/1/", session=session)
api.installations.get()
EDIT: Instead of X-Parse-REST-API-Key, it's actually X-Parse-Master-Key