Created
March 21, 2023 07:03
-
-
Save sherlock1453/9f8d9e1e07ce28d082f26a4014ab10ce to your computer and use it in GitHub Desktop.
Python request
This file contains 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 | |
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