Fix usage of default-graph for POST and introduce POST_FORM #1185
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes issue of POST requests in combination with default-graph as introduced in #1022 and #1175.
Proposed Changes
POST_FORM
besidesPOST
to let the user control whether to use query via URL-encoded POST or query via POST directly as per the SPARQL 1.1 Protocol for query operations (https://www.w3.org/TR/sparql11-protocol/#query-operation)Test
A unit test is still needed for this behavior.
I have written the following test case (also committed here: https://github.com/white-gecko/rdflib/tree/fix_sparqlstore_post_sketchtest), but it requires a context aware SPARQL endpoint at http://localhost:5000/sparql with the following data loaded. This can be achieved on a local setup with a QuitStore or maybe also Virtuoso. Unfortunately the fuseki included is not context aware afaik.