code: public function process(ServerRequestInterface $request, RequestHandlerInterface $requestHandler): ResponseInterface
      {
          $this->container->set(ServerRequestInterface::class, $request);
          $result = $this->dispatch($this->route($request));
          if ($result instanceof ResponseInterface) {
              return $result;
          }
  
          return $response = (new Response())
              ->withProtocolVersion('1.1')
              ->withBody(\GuzzleHttp\Psr7\stream_for($result));
      }
docs: Process an incoming server request and return a response, optionally delegating
  to the next middleware component to create the response.
  
  @param ServerRequestInterface $request
  @param RequestHandlerInterface $requestHandler
  
  @return ResponseInterface
  @throws Exception\DispatcherException
  @throws \DI\DependencyException
  @throws \DI\NotFoundException
  @throws \ReflectionException