Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Prefer --data-binary to -d for cURL arguments when setting request body to the contents of a file

...

Code Block
languagebash
title1a. Creating Sample Objects
curl -X POST -H "Content-type: application/sparql-update" -d-data-binary "@object-indexing.rdf" "http://localhost:8080/rest/objects/101"
curl -X POST -H "Content-type: application/pdf" --data-binary "@test.pdf" "http://localhost:8080/rest/objects/101/master/fcr:content"
curl -X POST -H "Content-type: application/sparql-update" --data-dbinary "@object-indexing.rdf" "http://localhost:8080/rest/objects/102
curl -X POST -H "Content-type: text/plain" --data-binary "@test.txt" "http://localhost:8080/rest/objects/102/master/fcr:content"
curl -X POST -H "Content-type: application/sparql-update" -d-data-binary "@object-indexing.rdf" "http://localhost:8080/rest/objects/103"
curl -X POST -H "Content-type: application/pdf" --data-binary "@test.pdf" "http://localhost:8080/rest/objects/103/master/fcr:content"
curl -X POST -H "Content-type: text/plain" --data-binary "@test.txt" "http://localhost:8080/rest/objects/103/text/fcr:content"

Find objects with a datastream named "text":

...