view docs/howToTest.txt @ 0:77530be3c747

intial
author dwinter
date Tue, 22 Nov 2011 15:47:57 +0100
parents
children
line wrap: on
line source

Test POST:

curl -i  -X POST -d "username=james&xpointer=xx" http://127.0.01:8280/AnnotationManager/annotations 

curl -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"username":"testname","xpointer":"xx","text":"mytext"}' http://127.0.0.1:8280/AnnotationManager/annotator/annotations 

curl -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '{"username":"testname","xpointer":"xx","text":"mytext"}' http://euler.mpiwg-berlin.mpg.de:58080/AnnotationManager/annotator/annotations 


curl -i -H "Content-Type: application/json" -H "Accept: application/json" -X POST -d '  {"id": "39fc339cf058bd22176771b3e3187329","created": "2011-05-24T18:52:08.036814","uri": "http://some.uri","text": "A note I wrote", "quote": "The lady said this.","ranges": [{"start": "/p[69]/font/font", "end": "/p[70]/font/font", "startOffset": "0", "endOffset": "120"}], "annotator_schema_version": "v1.0"}' http://127.0.0.1:8280/AnnotationManager/annotator/annotations 


Test: get:

curl -i -H "Accept: application/json" -X  GET  http://127.0.0.1:8280/AnnotationManager/annotator/annotations?uri=http://www.mpiwg-berlin.mpg.de

curl -i -H "Accept: application/json" -X  GET  http://127.0.0.1:8280/AnnotationManager/annotator/annotations?uri=http://some.uri