if is_{client,server} in rest.py