From 6c332797e2c3711318607b14e9b94cd6ec420674 Mon Sep 17 00:00:00 2001
From: Carlos Vega <carlos.vega@uni.lu>
Date: Tue, 19 Nov 2019 12:23:11 +0100
Subject: [PATCH] changed sparql wrapper to do POST requests instead of GET
 requests

---
 biokb/biokb.py | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/biokb/biokb.py b/biokb/biokb.py
index acbd1c5..214e4c1 100644
--- a/biokb/biokb.py
+++ b/biokb/biokb.py
@@ -4,7 +4,7 @@ from models.publication import Publication
 from models.coocurrence import CoOccurrence
 from utils import uri_to_entity_code, standarise_underscored_entity_code
 
-from SPARQLWrapper import SPARQLWrapper, JSON
+from SPARQLWrapper import SPARQLWrapper, JSON, POSTDIRECTLY
 from SPARQLWrapper.SPARQLExceptions import EndPointNotFound, EndPointInternalError, QueryBadFormed
 
 import logging
@@ -22,6 +22,7 @@ class MalformedQueryException(BioKBClientException):
 class BioKBservice(TextMiningService):
     def __init__(self, sparql_url="https://biokb.lcsb.uni.lu/sparql"):
         self.sparql = SPARQLWrapper(sparql_url)
+        self.sparql.setRequestMethod(POSTDIRECTLY)
         super().__init__('BioKB',
                          'This client communicates with BioKB triple store and Publication Solr index.')
 
-- 
GitLab