Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var SPARQLendpoint = {
- getData: function (query) {
- var endpointUrl = 'http://localhost:7200/repositories/myRepo',
- sparqlQuery = query,
- settings = {
- headers: { Accept: 'application/sparql-results+json'},
- data: { query: sparqlQuery },
- dataType: 'jsonp'
- };
- $.ajax(endpointUrl, settings).then(function (data) {
- $('body').append(($('<pre>').text(JSON.stringify(data))));
- console.log(data);
- });
- });
- }
- }
- query = 'here is the query';
- SPARQLendpoint.getData(query);
Add Comment
Please, Sign In to add comment