from urllib2 import Request, urlopen
query = "select ?s ?f ?g where{?s ?f ?g}"headers = {"SD-Query-Bindings": "", "SD-Connection-String": ""}request = Request("http://localhost:5820/myDb/query", data=query, headers=headers)response_body = urlopen(request).read()print response_body
Hello,I am trying to create a python wrapper for some calls i need following the documentation here: http://docs.stardog.apiary.io/My snippet is as follows:
from urllib2 import Request, urlopenquery = "select ?s ?f ?g where{?s ?f ?g}"headers = {"SD-Query-Bindings": "", "SD-Connection-String": ""}request = Request("http://localhost:5820/myDb/query", data=query, headers=headers)response_body = urlopen(request).read()print response_bodyand as a response i geturllib2.HTTPError: HTTP Error 401: UnauthorizedDo you have any idea why?
Maybe I have to authorise the rest (http) interface without login through the administrator?
--Regards,Michael.
-- --
You received this message because you are subscribed to the C&P "Stardog" group.
To post to this group, send email to sta...@clarkparsia.com
To unsubscribe from this group, send email to
stardog+u...@clarkparsia.com
For more options, visit this group at
http://groups.google.com/a/clarkparsia.com/group/stardog?hl=en