Ampersand use in rdfs:label not allowed?

I am getting a 500 error for a post call to .../db-name/update endpoint

PREFIX dc: <http://purl.org/dc/elements/1.1/>
INSERT DATA
{ 
  <http://example/book1> rdfs:label "A new & book" ;
                         dc:creator "A.N.Other" .
}

And if I remove the ampersand the above insert is successful.

Also for some reason when I am tailing the log the 500 error is not showing up.

Regards,
Radu

Hi Radu,

How are you making this POST request? Are you doing this via cURL or Postman? I am able to execute the query in Studio and via Postman.

Can you please share the full request you are making?

Best,
Noah

Stephen,

On the server sidde I am using 7.0.3 and on the client side python:

...
response = requests.request("POST", url, data=sparql_insert_query, headers=headers, verify=False)
print(response.status_code)    
...

Figured it out - I need to use:

  • 'content-type': "application/sparql-update"

  • the query should not start with "query=" but with "PREFIX ..."