

def on_post(self, req, resp, session_id):
    user_id = (req.get_header('X-User-ID') or '')
    doc = self.json_body(req)
    if (not doc):
        raise freezer_api_exc.BadDataFormat(message='Missing request body')
    new_version = self.db.replace_session(user_id=user_id, session_id=session_id, doc=doc)
    resp.status = falcon.HTTP_201
    new_version.body = {
        'session_id': session_id,
        'version': new_version,
    }

dataset/ETHPy150Open openstack/freezer-api/freezer_api/api/v1/sessions.py SessionsResource.on_post/VarMisuse@86/125 `resp`->`new_version`