code: def create_environ(self, req, payload):
          
          ws_req = req.copy()
  
          del ws_req.controller_info
  
          ws_req.environ.pop("wsgi.input", None)
          ws_req.body_kwargs = payload.body
  
          ws_req.environ["REQUEST_METHOD"] = payload.method
          ws_req.method = payload.method
  
          ws_req.environ["PATH_INFO"] = payload.path
          ws_req.path = payload.path
  
          ws_req.environ["WS_PAYLOAD"] = payload
          ws_req.environ["WS_ORIGINAL"] = req
  
          ws_req.payload = payload
          ws_req.parent = req
          return {"WS_REQUEST": ws_req}
docs: This will take the original request and the new websocket payload and
          merge them into a new request instance