2👍
✅
I got it:
headers = {'content-type': 'text/xml'}
r1 = requests.post("http://localhost:8080/geoserver/rest/workspaces",
auth=('admin', 'geoserver'),
data='<workspace><name>acme</name></workspace>',
headers=headers)
👤mrbf
Source:stackexchange.com