comparison Sphinx/source/plugins/python/extending-rest-api.py @ 703:a589668768d7

moving python samples in separate files (2)
author Sebastien Jodogne <s.jodogne@gmail.com>
date Fri, 11 Jun 2021 10:07:12 +0200
parents
children
comparison
equal deleted inserted replaced
702:6e02cd89eb6a 703:a589668768d7
1 import orthanc
2 import pprint
3
4 def OnRest(output, uri, **request):
5 pprint.pprint(request)
6 print('Accessing uri: %s' % uri)
7 output.AnswerBuffer('ok\n', 'text/plain')
8
9 orthanc.RegisterRestCallback('/(to)(t)o', OnRest)
10 orthanc.RegisterRestCallback('/tata', OnRest)