Common functions for developing REST services