Utility method for implementing HttpService.