HTTP GET requests with PREFIX

When I am using PREFIX in the HTTP GET/POST request, I still get the long URIs. Is PREFIX not supported or is a different syntax required?

Original URL:
http://localhost:5820/<myDB>/query?query=PREFIX code: <> SELECT * WHERE {?s ?p ?o}

Encoded URL:

o: Object { type: "uri", value: "" } ...

Expected but not received result:
o: Object { type: "uri", value: "code:AgeUnit" } ...

Prefix is correct. Can you edit your post to include the formatted text tag. The forum software has probably mangled your query a bit so it’s hard to tell exactly what you’re running. I’m guessing it’s either a small problem in the query or a url encoding problem.

Hi, I updated the question with remove any formatting. I am using already encodeURIComponent, for this the encoded URL is embedded as well.

It looks like it's a correct result but that you wanted the answer to be prefixed. Is that correct?

I think you just need to register the namespace with stardog namespace add ...

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.