

def __init__(self, route, function, catch_exceptions=True):
    super().__init__(route, function)
    self.catch_exceptions = catch_exceptions
    self.parse_body = ('parse_body' in route)
    self.set_status = route.get('status', False)
    self.response_headers = tuple(route.get('response_headers', {
        
    }).items())
    self.outputs = route.get('output', self.api.http.output_format)
    self._params_for_outputs = introspect.takes_arguments(self.outputs, *self.AUTO_INCLUDE)
    self._params_for_transform = introspect.takes_arguments(self.transform, *self.AUTO_INCLUDE)
    if ('output_invalid' in route):
        self._params_for_invalid_outputs = introspect.takes_arguments(self.invalid_outputs, *self.AUTO_INCLUDE)
    if ('on_invalid' in route):
        self._params_for_on_invalid = introspect.takes_arguments(self.on_invalid, *self.AUTO_INCLUDE)
    elif self.transform:
        self._params_for_on_invalid = self._params_for_transform
    if route['versions']:
        self.api.http.versions.update(route['versions'])
    self.interface.http = self

dataset/ETHPy150Open timothycrosley/hug/hug/interface.py HTTP.__init__/original