File: rest.py

package info (click to toggle)
orthanc-python 7.0%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,216 kB
  • sloc: cpp: 8,830; python: 795; sh: 62; makefile: 33
file content (10 lines) | stat: -rw-r--r-- 272 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
import orthanc
import pprint

def OnRest(output, uri, **request):
    pprint.pprint(request)
    print('Accessing uri: %s' % uri)
    output.AnswerBuffer('ok\n', 'text/plain')

orthanc.RegisterRestCallback('/(to)(t)o', OnRest)
orthanc.RegisterRestCallback('/tata', OnRest)