Processes the form.

@since 1.0.0

@param RequestInterface $request The request.

@return bool True if form was successfully processed, false otherwise.
437884
public function process(RequestInterface $request): bool
    {
        if (!$request->getMethod()->isPost()) {
            return false;
        }

        if ($this->checkOriginEnabled && !self::isValidOrigin($request)) {
            return false;
        }

        return $this->doProcess($request->getFormParameters(), $request->getUploadedFiles());
    }
1083525
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        $request = $request->withAttribute(self::ORIGINAL_REQUEST, $request);

        set_error_handler($this->createErrorHandler());

        try {
            $response = $handler->handle($request);
        } catch (Throwable $exception) {
            $response = $this->handleThrowable($exception, $request);
        }

        restore_error_handler();

        return $response;
    }
287343
public function sendRequest(RequestInterface $request): void
    {
        $requestId = $this->getRequestId($request);
        $this->pendingRequests[$requestId] = $this->createPromiseForRequest($request, true);
    }
517429
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        return $this->execute([$request, $handler]);
    }
680749
public function sendRequest(RequestInterface $request): ResponseInterface
    {
        $promise = $this->sendAsyncRequest($request);

        return $promise->wait();
    }
390593
public function process(RequestInterface $request, HandlerInterface $handler)
    {
        $middleware = $this->callback;

        return $middleware($request, $handler);
    }
29793
public function handle(RequestInterface $request)
    {
        $handler = new RoutingHandler($this->container);

        if (! $this->has(Application::MIDDLEWARE))
        {
            return $handler->handle($request);
        }

        $dispatcher = $this->get(Application::MIDDLEWARE);

        return $dispatcher->process($request, $handler);
    }
233054
public function process(RequestInterface $request, RequestHandlerInterface $handler)
    {
        $response = $handler->handle($request);

        $response->body()->write('World!');

        return $response;
    }
1051768
public function containsRequest(RequestInterface $request)
    {
        return in_array($request, $this->failedRequests, true) || in_array($request, $this->successfulRequests, true);
    }
1154817
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        if (!$this->isValid($request)) {
            return $this->createResponse(403);
        }

        return $handler->handle($request);
    }
364042
public function onRequest( RequestInterface $request ) {
        $localizedUri = Uri::withQueryValue( $request->getUri(), 'lang', $this->getEndpoint()->getLang() );
        return $request->withUri($localizedUri);
    }
465230
protected function doRequest(RequestInterface $request)
    {
        $ch = $this->createHandle($request);

        // Execute the request and close the connection.
        $content = curl_exec($ch);

        $error = curl_error($ch);

        if (!$this->getOption('allow_empty_result', false) && !trim((string) $content)) {
            // Error but nothing from cURL? Create our own
            $error = $error ?: 'No HTTP response received';

            throw new HttpRequestException($error, curl_errno($ch));
        }

        if (!$this->getOption('ignore_curl_error', false) && $error !== '') {
            throw new HttpRequestException($error, curl_errno($ch));
        }

        // Get the request information.
        $info = curl_getinfo($ch);

        // Close the connection.
        curl_close($ch);

        return $this->getResponse($content, $info);
    }
1052695
public function process(ServerRequestInterface $request, RequestHandlerInterface $handler): ResponseInterface
    {
        /* @var \Swoft\Http\Server\Parser\RequestParserInterface $requestParser */
        $requestParser = App::getBean('requestParser');
        $request       = $requestParser->parse($request);

        return $handler->handle($request);
    }
381975
public function handle(RequestInterface $request)
    {
        $interface = (string) Application::DISPATCHER;

        $dispatcher = new Dispatcher($this->original);

        $this->application->set($interface, $dispatcher);

        return $this->application->handle($request);
    }
592149
public function next(RequestInterface $request)
    {
        if (!count($this->processingStack)) {
            throw new \RuntimeException('No middleware response created for stack.');
        }
        if (!($request instanceof ServerRequestInterface)) {
            throw new \InvalidArgumentException();
        }
        /** @var ServerMiddlewareInterface $middleware */
        $middleware = array_shift($this->processingStack);
        return $middleware->process($request, $this);
    }
1371067
public function request(RequestInterface $request)
    {
        $uri = $request->getUri()
            ->withPath('')
            ->withQuery('')
            ->withFragment('');

        $uri = $uri . $request->getRequestTarget();

        $request = $request->withRequestTarget($uri);

        return $this->doRequest($request);
    }
69295
public function process(Request $request, DelegateInterface $frame)
    {
        $response = $frame->next($request);

        $cleared = $this->responseCookieJar->getClearedCookies();
        foreach ($cleared as $cookie) {
            $response->headers->clearCookie($cookie, DIR_REL . '/');
        }

        $cookies = $this->responseCookieJar->getCookies();
        foreach ($cookies as $cookie) {
            $response->headers->setCookie($cookie);
        }

        return $response;
    }