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

Content negotiation #88

Open
WolfgangFahl opened this issue Jun 20, 2024 · 0 comments
Open

Content negotiation #88

WolfgangFahl opened this issue Jun 20, 2024 · 0 comments

Comments

@WolfgangFahl
Copy link

WolfgangFahl commented Jun 20, 2024

Feature Request: Support Content Negotiation for Raw SPARQL Query Retrieval

Summary:
It would be extremely useful to retrieve the raw SPARQL query directly from a short URL via content negotiation. This feature would allow users to request the SPARQL query in a specific format, making programmatic access and integration simpler and more efficient.

Use Case:
Currently, users have to parse the HTML content to extract the SPARQL query, which adds unnecessary complexity and overhead. Supporting content negotiation would streamline this process.

Proposed Solution:
Implement content negotiation for URLs, allowing users to specify the desired format (e.g., text/plain or another appropriate MIME type) in the Accept header of the HTTP request to directly retrieve the raw SPARQL query.

Example curl Command:

curl -H "Accept: text/plain" -L "https://qlever.cs.uni-freiburg.de/wikidata/h6p82D"

should return

PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
SELECT * WHERE {
  ?person wdt:P31 wd:Q5 .
  ?pesron wdt:P106 ?occupation .
}
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

1 participant