Created
February 25, 2011 16:18
-
-
Save cgueret/844021 to your computer and use it in GitHub Desktop.
Redstore test put (Python2)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from rdflib import ConjunctiveGraph, RDF, URIRef | |
import httplib | |
if __name__ == '__main__': | |
graph = ConjunctiveGraph() | |
graph.add((URIRef("http://google.com"), RDF.type, URIRef("http://google.com"))) | |
headers = { 'Accept' : '*/*', 'Content-Type': 'application/rdf+xml' } | |
conn = httplib.HTTPConnection("127.0.0.1:8080") | |
conn.request("PUT", "/data/http://google.com", body=graph.serialize(), headers=headers) | |
#response = conn.getresponse() | |
conn.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment