@param RequestInterface $request

@return \Ekyna\Component\Dpd\ResponseInterface
508968
public function execute(RequestInterface $request): ResponseInterface
    {
        $this->supports($request);

        if ($request instanceof InputInterface) {
            $request->validate();
        }

        $client = $this->getClient();

        $data = array_replace($request->toArray(), [
            'carrier' => $client->getCarrier(),
            'key'     => $client->getKey(),
        ]);

        $response = $client->call($this->getMethodName(), $data);

        return $this->parseResponse($response->getBody()->getContents());
    }
1060309
public function getSiteFromRequest(RequestInterface $request)
    {
        $domain = PhpServer::getDomainFormHost(
            $request->getUri()->getHost()
        );

        $this->siteService->getSite(
            $domain
        );
    }
1015901
public function sendRequest(RequestInterface $request)
    {
        if ($request instanceof InternalRequestInterface) {
            return $this->sendInternalRequest($request);
        }

        $protocolVersion = $this->getConfiguration()->getProtocolVersion();
        $this->getConfiguration()->setProtocolVersion($request->getProtocolVersion());

        $response = $this->send(
            $request->getUri(),
            $request->getMethod(),
            $request->getHeaders(),
            $request->getBody()
        );

        $this->getConfiguration()->setProtocolVersion($protocolVersion);

        return $response;
    }
680845
public function getRequestAsString(RequestInterface $request)
    {
        return $this->getFormattedQueryParameters($request) .
        PHP_EOL .
        $this->getBodyWithHeaders($request);
    }
245600
private function doSearch(RequestInterface $request)
    {
        $searchRequest = [
            'index' => $request->getIndex(),
            'type'  => $request->getType(),
            'body'  => $this->requestMapper->buildSearchRequest($request),
        ];

        return $this->client->search($searchRequest);
    }
33878
protected function setAllowance(RequestInterface $request)
    {
        return function (ResponseInterface $response) use ($request) {
            $this->provider->setRequestAllowance($request, $response);

            return $response;
        };
    }
586046
private function appendQueryParams(RequestInterface $request)
    {
        $queryParams = $this->auth->getQueryParameters();
        foreach ($queryParams as $key => $value) {
            $uri = Uri::withQueryValue($request->getUri(), $key, $value);
            $request = $request->withUri($uri);
        }
        return $request;
    }
201021
public function getRoute(RequestInterface $request)
    {
        $route = $request->getUri()->__toString();
        if ($request->getMethod() === 'DELETE' && strpos($request->getUri(), 'messages') !== false) {
            $route = 'DELETE-'.$request->getUri();
        }

        return $route;
    }
805939
public function send(RequestInterface $request)
	{
		$request = $this->authentication($request);
		$defaultHeaders = [
			'Accept'       => $this->getContentType(),
			'Content-Type' => $this->getContentType()
		];

		foreach ($defaultHeaders as $defaultHeader => $value)
		{
			if ( ! $request->hasHeader($defaultHeader))
			{
				$request = $request->withHeader($defaultHeader, $value);
			}
		}

		$response = $this->client->sendRequest($request);
		$response = $this->transformResponseToException($request, $response);

		return $response;
	}
681150
public function transducer(RequestInterface $request)
    {
        $response = null;
        if (count($this->middleware)) {
            $md = array_pop($this->middleware);
            $next = function (RequestInterface $request) {
                return $this->transducer($request);
            };

            if (is_callable($md)) {
                $response = $md($request, $next);
            } elseif (is_array($md)) {
                list($class, $action) = $md;
                $instance = is_object($class) ? $class : new $class();
                $response = $instance->$action($request, $next);
            }

            if ($response instanceof Generator) {
                $response = Poroutine::resolve($response);
            }
        }

        return $response ?? new Response();
    }
952685
public function build(RequestInterface $request): ResponseInterface
    {
        return $this->responseFactory->createResponse(
            $this->getMockStatusForRequest($request),
            '',
            $this->getMockHeadersForRequest($request),
            $this->getMockBodyForRequest($request)
        );
    }
311393
public function handle(RequestInterface $request)
    {
        $response = $request->send();
        $headers = $response->getHeaders()->getAll();
        $body = $response->getBody(true);
        $statusCode = $response->getStatusCode();

        $symfonyHeaders = array();

        foreach ($headers as $keys) {
            /**
             * Transfer-Encoding type chunked is not suported by symfony response
             */
            if($keys->getName() == "Transfer-Encoding" && $keys->__toString() === 'chunked'){
                continue;
            }
            $symfonyHeaders[$keys->getName()] = $keys->__toString();
        }

        return new Response($body,$statusCode,$symfonyHeaders);
    }
1361285
public function dequeue(RequestInterface $request)
    {
        $this->dispatch('mock.request', array('plugin' => $this, 'request' => $request));

        $item = array_shift($this->queue);
        if ($item instanceof Response) {
            if ($this->readBodies && $request instanceof EntityEnclosingRequestInterface) {
                $request->getEventDispatcher()->addListener('request.sent', $f = function (Event $event) use (&$f) {
                    while ($data = $event['request']->getBody()->read(8096));
                    // Remove the listener after one-time use
                    $event['request']->getEventDispatcher()->removeListener('request.sent', $f);
                });
            }
            $request->setResponse($item);
        } elseif ($item instanceof CurlException) {
            // Emulates exceptions encountered while transferring requests
            $item->setRequest($request);
            $state = $request->setState(RequestInterface::STATE_ERROR, array('exception' => $item));
            // Only throw if the exception wasn't handled
            if ($state == RequestInterface::STATE_ERROR) {
                throw $item;
            }
        }

        return $this;
    }
977926
private function normalizeRequest(RequestInterface $request): RequestInterface
    {
        $uri = $request->getUri();
        $updated = false;

        $normalizedPath = preg_replace('~/{2,}~', '/', $uri->getPath());

        $normalizedPath = preg_replace('~/\.(/|$)~', '/', $normalizedPath);
        do {
            $normalizedPath = preg_replace('~/[^/]+(?<!\.\.)/+\.\.(/|$)~', '/', $normalizedPath, 1, $count);
        } while ($count);

        $normalizedPath = $this->decodePercentEncoding($normalizedPath);

        if ($uri->getPath() !== $normalizedPath) {
            $uri = $uri->withPath($normalizedPath);
            $updated = true;
        }

        $normalizedQuery = $this->decodePercentEncoding($uri->getQuery());

        if ($uri->getQuery() !== $normalizedQuery) {
            $uri = $uri->withQuery($normalizedQuery);
            $updated = true;
        }

        if ($updated) {
            return $request->withUri($uri);
        }

        return $request;
    }
1294042
public function submit(RequestInterface $request)
    {
        $response = $this->browser->submit(
            $this->options['host'] . $request->getPath(),
            $request->getData(),
            $request->getMethod());

        return json_decode($response->getContent());
    }
656618
public function getResponseFor(RequestInterface $request): ResponseInterface
    {
        try {
            return $this->responses[$request];
        } catch (\UnexpectedValueException $e) {
            throw new \UnexpectedValueException('Request not found', $e->getCode(), $e);
        }
    }
449510
public function methodNotAllowedResponse(RequestInterface $request)
    {
        if ($this->methodNotAllowedChain) {
            return $this->methodNotAllowedChain->execute(
                [$this->server, $request],
                $this->middlewares
            );
        }
        return Response::make('<html><head><title>405 Method Not Allowed</title></head><body bgcolor="white"><h1>405 Method Not Allowed</h1></body></html>', 405);
    }