Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save sherlock1453/9f8d9e1e07ce28d082f26a4014ab10ce to your computer and use it in GitHub Desktop.
Save sherlock1453/9f8d9e1e07ce28d082f26a4014ab10ce to your computer and use it in GitHub Desktop.
Python request
import requests
url = "http://192.168.100.231:4502/libs/granite/security/post/authorizables"
payload={'createUser': 'testuser',
'authorizableId': 'testuser',
'rep:password': 'abc123',
'membership': 'contributor'}
files=[
]
headers = {
'Authorization': 'Basic dmliaGFuc2h1Lmtpc2xheTpwYXNzd29yZA=='
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment