Skip to content
Snippets Groups Projects
Commit 6c332797 authored by Carlos Vega's avatar Carlos Vega
Browse files

changed sparql wrapper to do POST requests instead of GET requests

parent ec79ed43
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ from models.publication import Publication ...@@ -4,7 +4,7 @@ from models.publication import Publication
from models.coocurrence import CoOccurrence from models.coocurrence import CoOccurrence
from utils import uri_to_entity_code, standarise_underscored_entity_code 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 from SPARQLWrapper.SPARQLExceptions import EndPointNotFound, EndPointInternalError, QueryBadFormed
import logging import logging
...@@ -22,6 +22,7 @@ class MalformedQueryException(BioKBClientException): ...@@ -22,6 +22,7 @@ class MalformedQueryException(BioKBClientException):
class BioKBservice(TextMiningService): class BioKBservice(TextMiningService):
def __init__(self, sparql_url="https://biokb.lcsb.uni.lu/sparql"): def __init__(self, sparql_url="https://biokb.lcsb.uni.lu/sparql"):
self.sparql = SPARQLWrapper(sparql_url) self.sparql = SPARQLWrapper(sparql_url)
self.sparql.setRequestMethod(POSTDIRECTLY)
super().__init__('BioKB', super().__init__('BioKB',
'This client communicates with BioKB triple store and Publication Solr index.') 'This client communicates with BioKB triple store and Publication Solr index.')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment