1
0
mirror of https://github.com/ISEAL-Community/iseal-core.git synced 2025-05-08 14:16:03 +02:00

util/create-schema-dspace.py: fix error in POST

The missing "headers=headers" was causing an HTTP 415 that took me
over an hour to fix. Sigh.
This commit is contained in:
2022-01-11 20:54:19 +02:00
parent 0fca6bbc90
commit b0ef411f62

@ -98,7 +98,9 @@ def create_schema(schema):
print(f" Attempting to create schema: {schema['prefix']}") print(f" Attempting to create schema: {schema['prefix']}")
try: try:
request = requests.post(request_url, headers, json=schema, cookies=cookies) request = requests.post(
request_url, headers=headers, json=schema, cookies=cookies
)
except requests.ConnectionError: except requests.ConnectionError:
sys.stderr.write(f" Could not connect to REST API: {args.request_url}\n") sys.stderr.write(f" Could not connect to REST API: {args.request_url}\n")