Send the given request through the application.

This method allows you to fully customize the entire Request object.

@param  \Illuminate\Http\Request  $request
@return $this
960992
public function handle(Request $request)
    {
        $this->currentUri = $request->fullUrl();

        $this->response = $this->app->prepareResponse($this->app->handle($request));

        return $this;
    }
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;
    }
785628
public function send(Request $request)
    {
        $curl = $this->prepareRequest($request);
        
        $data = curl_exec($curl);
        if (false === $data) {
            $errorMsg = curl_error($curl);
            $errorNo  = curl_errno($curl);

            throw new \RuntimeException($errorMsg, $errorNo);
        }
        
        $data = $this->filterRawResponse($data);
        
        return $this->prepareResponse($data, curl_getinfo($curl, CURLINFO_HTTP_CODE));
    }
1002818
public function send(?Request $request = null) {
        $request = self::validateRequest($request);

        $this->
            render($request)->
            prepare($request)->
            send();
    }
667783
public function send(Request $request)
    {
        $request->configure($this->config);

        $httpClient = new \GuzzleHttp\Client();

        $r = $httpClient->request('POST', $this->getUrl(), [
            'body' => \GuzzleHttp\Psr7\stream_for((string) $request),
        ]);

        return Response::create($r->getBody()->getContents());
    }
152456
private function setRequest(Request $request)
    {
        $this->mergeVisitorActivityData([
            'method'      => $request->method(),
            'is_ajax'     => $request->ajax(),
            'is_secure'   => $request->isSecure(),
            'is_json'     => $request->isJson(),
            'wants_json'  => $request->wantsJson(),
        ]);

        $this->request = $request;

        return $this;
    }
1139982
public function send(Request $request)
    {
        $response = new ListResponse();
        $rpbReq   = $this->createRpbMessage($request);
        $socket   = $this->client->emit($rpbReq, RiakMessageCodes::LIST_BUCKETS_REQ);
        $iterator = new ProtoStreamIterator($this->client, $socket, RiakMessageCodes::LIST_BUCKETS_RESP);

        $response->iterator = new ProtoListResponseIterator($iterator);

        return $response;
    }
311673
public function sendRequest(OAuthRequest $request)
    {
        switch ($request->getMethod()) {
            case OAuthRequest::METHOD_GET:
                $httpResponse = $this->httpAdapter->getContent($request->getUrl(), $request->getHeaders());
                break;

            case OAuthRequest::METHOD_POST:
                $postParameters = array();
                foreach ($request->getPostParameters() as $name => $value) {
                    $postParameters[rawurldecode($name)] = rawurldecode($value);
                }

                $httpResponse = $this->httpAdapter->postContent(
                    $request->getUrl(),
                    $request->getHeaders(),
                    $postParameters,
                    $request->getFileParameters()
                );
                break;

            default:
                throw new \RuntimeException(sprintf(
                    'The request method "%s" is not supported.',
                    $request->getMethod()
                ));
        }

        $response = new OAuthResponse($httpResponse, $request->getResponseFormat());

        if (!$response->isValid()) {
            throw new OAuthException('The http response is not valid.', $response);
        }

        return $response;
    }
1285830
public function send(Request $request)
    {
        $response    = new GetResponse();
        $httpRequest = $this->createHttpRequest($request);

        try {
            $httpResponse = $this->client->send($httpRequest);
            $code         = $httpResponse->getStatusCode();
        } catch (RequestException $e) {
            if ($e->getCode() == 404 && $request->notfoundOk) {
                return $response;
            }

            throw $e;
        }

        if ( ! isset($this->validResponseCodes[$code])) {
            throw RiakTransportException::unexpectedStatusCode($code);
        }

        $json    = $httpResponse->json();
        $context = isset($json['context']) ? $json['context'] : null;
        $value   = $json['value'];
        $type    = $json['type'];

        $response->type    = $type;
        $response->context = $context;
        $response->value   = $this->opConverter->fromArray($type, $value);

        return $response;
    }
415700
public function send($request)
    {
        $this->handle->init();

        $this->handle->setOption(CURLOPT_URL, $request->getURL());
        $this->handle->setOption(CURLOPT_HTTPHEADER, $request->getHeaders());
        $this->handle->setOption(CURLOPT_RETURNTRANSFER, true);
        $this->handle->setOption(CURLOPT_CONNECTTIMEOUT, $this->getTimeout());
        $this->handle->setOption(CURLOPT_TIMEOUT, $this->getTimeout());
        $this->handle->setOption(CURLOPT_SSL_VERIFYHOST, 2);
        $this->handle->setOption(CURLOPT_SSL_VERIFYPEER, true);

        $data = $this->handle->execute();
        $info = $this->handle->getInfo();
        $error = $this->handle->getError();

        $this->handle->close();

        /*
         * A failure occurred if:
         * payload is false (e.g. HTTP timeout?).
         * info is false, then it has no HTTP status code.
         */
        if (strlen($error) > 0) {
            throw new KlarnaException(
                "Connection failed with error: {$error}"
            );
        }

        return $request->createResponse(intval($info['http_code']), $data);
    }
782269
public function send(Request $request)
    {
        $response   = new PutResponse();
        $rpbPutReq  = $this->createRpbMessage($request);
        $rpbPutResp = $this->client->send($rpbPutReq, RiakMessageCodes::DT_UPDATE_REQ, RiakMessageCodes::DT_UPDATE_RESP);

        if ( ! $rpbPutResp instanceof DtUpdateResp) {
            return $response;
        }

        if ($rpbPutResp->hasContext()) {
            $response->context = $rpbPutResp->context;
        }

        if ($rpbPutResp->hasCounterValue()) {
            $response->value = $rpbPutResp->counter_value;
            $response->type  = 'counter';
        }

        if ($rpbPutResp->hasSetValue()) {
            $response->value = $rpbPutResp->set_value;
            $response->type  = 'set';
        }

        if ($rpbPutResp->hasMapValue()) {
            $response->value = $this->opConverter->fromProtoBuf($rpbPutResp->map_value);
            $response->type  = 'map';
        }

        return $response;
    }
236277
private function send(Request $request)
    {
        $options = [
            'base_uri' => self::BASE_URI,
            'http_errors' => false,
        ];

        return $this->client->send($request, $options);
    }
1343644
public function send(Request $request) {
        $method   = strtolower($request->getMethod());
        $response = $method === HttpMethods::GET || $method === HttpMethods::DELETE ? $this->restClient->$method($request->getUrlAndQuery(), $request->getCurlOptions()) : $this->restClient->$method($request->getUrlAndQuery(), $request->getPayload(), $request->getCurlOptions());

        try {
            return $request->isExpectedStatusCode($response->getStatusCode()) ? $response : Exceptions::RequestFailedException($request, $response->getStatusCode(), $response->getContent());
        } catch (DBALException\DriverException $e) {
            $responseExceptionFactory = new ResponseExceptionFactory();
            throw $responseExceptionFactory->createDbalException($response, $e);
        }
    }
673846
protected function sendRequestThroughRouter(Request $request)
    {
        return (new Pipeline($this->app))->send($request)->then(function ($request) {

            /**
             * @var Response $response
             */
            $response = $this->router->dispatch($request);

            if (property_exists($response, 'exception') && $response->exception instanceof Exception) {
                throw $response->exception;
            }

            return $response;
        });
    }
1140785
public function send(Request $request)
    {
        $interface = $request->getInterface();
        $service = ConfigFactory::getClient()->getService($interface);
        $url = $service->getUrl();

        $requestRaw = Formatter::serialize($request);
        $responseRaw = $this->protocol->sendData($url, $requestRaw);
        $response = @Formatter::unserialize($responseRaw);
        if (!($response instanceof Response)) {
            LoggerProxy::getInstance()->error("illegal response", array($responseRaw));
            throw new InitiallyRpcException("illegal response");
        } elseif ($response->isHasException()) {
            $exception = $response->getException();
            if (is_object($exception) && $exception instanceof Exception) {
                throw $exception;
            } else if (is_string($exception)) {
                if (class_exists($exception)) {
                    throw new $exception($response->getExceptionMessage());
                } else {
                    throw new InitiallyRpcException($response->getExceptionMessage());
                }
            }
        }

        return $response->getResult();
    }
1207018
public function sendRequest(Request $request)
	{
		$this->prepareRequest($request);

		$result = curl_exec($this->ch);

		if ($result === false) {
			$errno = curl_errno($this->ch);
			$errmsg = curl_error($this->ch);
			$msg = "cURL request failed with error [$errno]: $errmsg";
			curl_close($this->ch);
			throw new cURLException($request, $msg, $errno);
		}

		$response = $this->createResponseObject($result);

		curl_close($this->ch);

		return $response;
	}
1246983
public function send(Request $request)
    {
        $this->monitor->start($this->metricName, ['service_key' => $request->getServiceKey(), 'request_key' => $request->getRequestKey()]);
        $response = $this->sender->send($request);
        $this->monitor->end($this->metricName, ['response_status' => $response->getStatusCode()]);
        return $response;
    }