public function request(): Request
    {
        try {
            $request = $this->container->get(Request::class);
        } catch (ContainerExceptionInterface $e) {
            throw new ScopeException(
                "Unable to get `ServerRequestInterface` in active container scope",
                $e->getCode(),
                $e
            );
        }

        //Flushing input state
        if ($this->request !== $request) {
            $this->bags = [];
            $this->request = $request;
        }

        return $this->request;
    }