0

My update is working because I can query the data I'd sent, but the response I get is in XML:

<?xml version="1.0"?><data modified="429" milliseconds="437"/>

I am setting the request header Accept:

con.setRequestProperty("Accept", "application/sparql-results+json,application/json");
double-beep
  • 5,031
  • 17
  • 33
  • 41
wnm3
  • 381
  • 3
  • 17
  • `con.setRequestProperty("Accept", "application/json");` doesnt work? – Gilles-Antoine Nys May 31 '18 at 09:16
  • no, it just returns an xml string with the results. I tested removing the application/sparql-results+json so it only had application/json and still get the xml string. – wnm3 May 31 '18 at 20:32

1 Answers1

1

Use this parameter (not header) instead: format=json

Paul Cuddihy
  • 477
  • 6
  • 12