Allows the use of the Prez /sparql passthrough endpoint using the POST method rather than GET.
This supports larger SPARQL queries on Prez APIs that do not support long query args in GET requests.
Fixes an issue on Azure APIM where it cannot accept an API route where the query param (/sparql?query=...) is longer than 2048 characters. It allows unlimited payload on POST.
I don't think this implementation is the cleanest way of doing it (all users of useSparqlRequest() get both a sparqlGetRequest fn and a sparqlPostRequest fn, and can use whichever they prefer). But it is the method I used to get around the issue.
Allows the use of the Prez /sparql passthrough endpoint using the POST method rather than GET.
This supports larger SPARQL queries on Prez APIs that do not support long query args in GET requests.
Fixes an issue on Azure APIM where it cannot accept an API route where the query param (/sparql?query=...) is longer than 2048 characters. It allows unlimited payload on POST.
I don't think this implementation is the cleanest way of doing it (all users of
useSparqlRequest()
get both asparqlGetRequest
fn and asparqlPostRequest
fn, and can use whichever they prefer). But it is the method I used to get around the issue.This requires corresponding PR to be merged in backend Prez-api: https://github.com/RDFLib/prez/pull/239