caterva2.subscribe#
- caterva2.subscribe(root, urlbase=None, auth_cookie=None)#
Subscribes to a specified root.
- Parameters:
- Returns:
Server response as a string.
- Return type:
str
Examples
>>> import caterva2 as cat2 >>> urlbase = 'https://demo.caterva2.net' >>> root_name = 'h5numbers_j2k' >>> cat2.subscribe(root_name, urlbase) 'Ok' >>> cat2.get_roots(urlbase)[root_name] {'name': 'h5numbers_j2k', 'http': 'localhost:8011', 'subscribed': True}