def __call__(self, environ, start_response):
        req = Request(environ)
        try:
            meth = getattr(self, req.method, None)
            if meth is None:
                raise exc.HTTPMethodNotAllowed(
                    "method %r not allowed" % req.method)
                    #allowed='POST')
            resp = meth(req)
        except ValueError, e:
            resp = exc.HTTPBadRequest(str(e))
        except exc.HTTPException, e:
            resp = e
        return resp(environ, start_response)
dataset/ETHPy150Open hpk42/p4p/attic/friend_client.py/ReceiveApp.__call__/original