POSTing with rauth
akpalmer
Registered Users Posts: 2 Beginner grinner
I trying to understand how to post with pythons rauth? Looking at http://rauth.readthedocs.org/en/latest/api/
I get
post(url, data=None, json=None, **kwargs)Sends a POST request. Returns Response object.
Parameters:
So this is how I set mine up
session.post(
API_ORIGIN + '/api/v2/node/zgnNQF!children', json={"AutoRename": 'false',"Description": "this is a test album","HideOwner": 'false',"HighlightImageUri": "","Name": "Welcome","Keywords": [],"Password": "","PasswordHint": "","Privacy": "Public","SecurityType": "None","SmugSearchable": "Inherit from User","SortDirection":"Descending","SortMethod": "DateModified","Type": "Folder","UrlName": "HelloWolrdBrian","WorldSearchable": "Inherit from User"},headers={'Accept': 'application/json' }).text
Can some one tell me what im doing wrong. Thanks in advanced
I get
post(url, data=None, json=None, **kwargs)Sends a POST request. Returns Response object.
Parameters:
- url – URL for the new Request object.
- data – (optional) Dictionary, bytes, or file-like object to send in the body of the Request.
- json – (optional) json to send in the body of the Request.
- **kwargs – Optional arguments that request takes.
So this is how I set mine up
session.post(
API_ORIGIN + '/api/v2/node/zgnNQF!children', json={"AutoRename": 'false',"Description": "this is a test album","HideOwner": 'false',"HighlightImageUri": "","Name": "Welcome","Keywords": [],"Password": "","PasswordHint": "","Privacy": "Public","SecurityType": "None","SmugSearchable": "Inherit from User","SortDirection":"Descending","SortMethod": "DateModified","Type": "Folder","UrlName": "HelloWolrdBrian","WorldSearchable": "Inherit from User"},headers={'Accept': 'application/json' }).text
Can some one tell me what im doing wrong. Thanks in advanced
0
Comments
I think I almost have a fix to share. (I am no longer getting authentication-related errors.) Once I have my app working I can share some details.