@prefix ex: <http://example.org/image#>.
@prefix http: <http://www.w3.org/2011/http#>.
@prefix dbpedia: <http://dbpedia.org/resource/>.
<myphoto.jpg> a <http://dbpedia.org/resource/Image>.
_:sk0 http:methodName "POST".
_:sk0 http:requestURI "/images/".
_:sk0 http:body <myphoto.jpg>.
_:sk0 http:resp _:sk1.
_:sk1 http:body <myphoto.jpg>.
I want my machine to parse this output to construct the HTTP request.
it's an HTTP POST request to /images/. it's body is myphoto.jpg
The response to this request is a representation of myphoto.jpg
I use RDFlib to read .n3 file output like this:
(rdflib.term.BNode('f933eede341d345b580e3c40505a2b4d0b1'), rdflib.term.URIRef(u'http://www.w3.org/2011/http#methodName'), rdflib.term.Literal(u'POST'))
(rdflib.term.URIRef(u'file:///home/pi/myphoto.jpg'), rdflib.term.URIRef(u'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'), rdflib.term.URIRef(u'http://dbpedia.org/resource/Image'))
(rdflib.term.BNode('f933eede341d345b580e3c40505a2b4d0b1'), rdflib.term.URIRef(u'http://www.w3.org/2011/http#resp'), rdflib.term.BNode('f933eede341d345b580e3c40505a2b4d0b2'))
(rdflib.term.BNode('f933eede341d345b580e3c40505a2b4d0b1'), rdflib.term.URIRef(u'http://www.w3.org/2011/http#requestURI'), rdflib.term.Literal(u'/images/'))
(rdflib.term.BNode('f933eede341d345b580e3c40505a2b4d0b1'), rdflib.term.URIRef(u'http://www.w3.org/2011/http#body'), rdflib.term.URIRef(u'file:///home/pi/myphoto.jpg'))
(rdflib.term.BNode('f933eede341d345b580e3c40505a2b4d0b2'), rdflib.term.URIRef(u'http://www.w3.org/2011/http#body'), rdflib.term.URIRef(u'file:///home/pi/myphoto.jpg'))
how to let machine execute this output to construct the HTTP request?
hope you can give some help and instruction.
Thank you for help you can provide.sheng