zazuko / vscode-sparql-notebook

Visual Studio Code SPARQL Notebook Extension
https://marketplace.visualstudio.com/items?itemName=Zazuko.sparql-notebook
Other
26 stars 8 forks source link

Define Proper HTTP Headers for Construct and Select SPARQL Requests #56

Closed BenjaminHofstetter closed 1 year ago

BenjaminHofstetter commented 1 year ago

Some SPARQL endpoint (e.g. https://github.com/vemonet/rdflib-endpoint) can't handle combined Accept headers like "application/sparql-results+json,text/turtle" and will return their default (xml in this case) instead. the proposed refactoring uses only one type, depending of the type of query used.

proposed solution from @simonstey in PR #55

This is related to #28

BenjaminHofstetter commented 1 year ago

@simonste Thank you for your contribution! I appreciate your effort in addressing this issue. The proposed solution is too vague. I try to find another way.

ktk commented 1 year ago

I'm ok if we can find a proper workaround but in the end it's IMO a bug in whatever cannot handle combined accept headers. This is part of a standard and there are libraries taking care of that for almost any programming language out there. A quick google reveals for example https://pypi.org/project/accept-types/ for Python.

So IMO that should become an issue at rdflib-endpoint instead.

BenjaminHofstetter commented 1 year ago

Indeed. But now I know why Virtuoso was always returning sparql-result+json instead of Turtle for a construct query.

BenjaminHofstetter commented 1 year ago

@simonstey published in 0.0.24