Ajax post example [Jquery]

by sqiudward

HTML

<script src="http://jquery-json.googlecode.com/files/jquery.json-2.2.min.js"></script>

JavaScript

var data = `query=PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX local: <http://www.semanticweb.org/hp/ontologies/2019/1/Transmission(v1)#>

SELECT DISTINCT ?a
WHERE {
  ?a rdfs:subClassOf local:SubstationTransformer .
  local:Effectby rdfs:range ?e .
  local:Rain ?f ?g .
}
ORDER BY ASC(?a)`;

/*
$.ajax({
    url:"http://localhost:3030/smartGrid/sparql",
    data:data,
    type:"POST",
    success:function(response)
    {
       console.log(response);
    }
 
});
*/
console.log(0/1000);