Skip to content

Commit

Permalink
change oekg sparql endpoint view method to post
Browse files Browse the repository at this point in the history
  • Loading branch information
jh-RLI committed Dec 16, 2024
1 parent 5355fa8 commit d566342
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions oekg/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from django.core.exceptions import SuspiciousOperation
from django.http import HttpResponseBadRequest, JsonResponse
from django.shortcuts import render
from django.views.decorators.http import require_GET
from django.views.decorators.http import require_POST

from oeplatform.settings import OEKG_SPARQL_ENDPOINT_URL
from oekg.utils import validate_sparql_query
Expand All @@ -14,9 +14,9 @@ def main_view(request):
return response


@require_GET
@require_POST
def sparql_endpoint(request):
sparql_query = request.GET.get("query", "")
sparql_query = request.POST.get("query", "")

if not sparql_query:
return HttpResponseBadRequest("Missing 'query' parameter.")
Expand Down

0 comments on commit d566342

Please sign in to comment.