the-library-code / dspace-rest-python

DSpace REST API Client Library
BSD 3-Clause "New" or "Revised" License
24 stars 19 forks source link

Wrong Header for api_post_uri #13

Closed andreasgeissner closed 3 months ago

andreasgeissner commented 3 months ago

My API calls for creating relationships have stopped working with the latest library version. I think the reason is the following:

The Content Type for URI Lists is defined as "text-uri-list" by line 110 in client.py

self.list_request_headers = {'Content-type': 'text-uri-list', 'User-Agent': self.USER_AGENT}

However, as per the REST contract for creating relationships, it should be "text/uri-list", so

self.list_request_headers = {'Content-type': 'text/uri-list', 'User-Agent': self.USER_AGENT}

Thanks for the great work!