Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

POSTing a query #509

Closed
lolive opened this issue Nov 2, 2021 · 4 comments
Closed

POSTing a query #509

lolive opened this issue Nov 2, 2021 · 4 comments

Comments

@lolive
Copy link

lolive commented Nov 2, 2021

Hi.
I wish I could send my queries to the Osm-Planet endpoint via POST.
But it seems that this fails:
https://yasgui.triply.cc/#query=PREFIX%20osmkey%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fwiki%2FKey%3A%3E%0APREFIX%20geo%3A%20%3Chttp%3A%2F%2Fwww.opengis.net%2Font%2Fgeosparql%23%3E%0ASELECT%20%3Fosm_id%20%3Fgeometry%20WHERE%20%7B%0A%20%20%3Fosm_id%20osmkey%3Abuilding%20%22university%22%20.%0A%20%20%3Fosm_id%20geo%3AhasGeometry%20%3Fgeometry%20.%0A%7D%20LIMIT%201000%0A&endpoint=https%3A%2F%2Fqlever.informatik.uni-freiburg.de%2Fapi%2Fosm-planet&requestMethod=POST&tabTitle=Query&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq%3D0.9&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq%3D0.9&outputFormat=table

If I switch the HTTP method to GET, things work fine:
https://yasgui.triply.cc/#query=PREFIX%20osmkey%3A%20%3Chttps%3A%2F%2Fwww.openstreetmap.org%2Fwiki%2FKey%3A%3E%0APREFIX%20geo%3A%20%3Chttp%3A%2F%2Fwww.opengis.net%2Font%2Fgeosparql%23%3E%0ASELECT%20%3Fosm_id%20%3Fgeometry%20WHERE%20%7B%0A%20%20%3Fosm_id%20osmkey%3Abuilding%20%22university%22%20.%0A%20%20%3Fosm_id%20geo%3AhasGeometry%20%3Fgeometry%20.%0A%7D%20LIMIT%201000%0A&endpoint=https%3A%2F%2Fqlever.informatik.uni-freiburg.de%2Fapi%2Fosm-planet&requestMethod=GET&tabTitle=Query&headers=%7B%7D&contentTypeConstruct=application%2Fn-triples%2C*%2F*%3Bq%3D0.9&contentTypeSelect=application%2Fsparql-results%2Bjson%2C*%2F*%3Bq%3D0.9&outputFormat=table

Can the SPARQL endpoint support both GET and POST?

@hannahbast
Copy link
Member

Thank you for that comment. A rewrite of the HTTP module is already on our TODO list (also to support Accept: headers and the like) and then we will also support POST.

In the meantime a question: Why do you prefer to send a POST request?

@lolive
Copy link
Author

lolive commented Nov 3, 2021

While developping Datao.net, I have had issues with big queries sent via GET on some endpoints. So it is sending them via POST.

@lolive
Copy link
Author

lolive commented Nov 3, 2021

Thank you for that comment. A rewrite of the HTTP module is already on our TODO list (also to support Accept: headers and the like) and then we will also support POST.

Btw, does this statement imply that it is not possible to get results as RDF/XML at the moment?

@hannahbast
Copy link
Member

We have rewritten the HTTP module in the meantime. Media types supported are: application/qlever-results+json, application/sparql-results+json, text/tab-separated-values, text/csv, text/turtle, application/octet-stream

POST is still not implemented, but on your list, see #615

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants