Create a new redirect response, while putting the current URL in the session.

@param  string  $path
@param  int  $status
@param  array  $headers
@param  bool|null  $secure
@return \Illuminate\Http\RedirectResponse
439695
public function redirectGuest($path, $status = 302, $headers = [], $secure = null)
    {
        respondWith(response()->redirectGuest($path, $status, $headers, $secure));
    }
1062744
protected function httpPost(string $path, array $params = [], array $requestHeaders = []): ResponseInterface
    {
        $requestHeaders['Content-Type'] = 'application/x-www-form-urlencoded';

        return $this->httpPostRaw($path, http_build_query($params), $requestHeaders);
    }
336197
public function redirect($path, $replace = true, $http_response_code = null, $response = null)
    {
        if ($this->isSingle()) {
            UrlManager::redirect($path, $replace, $http_response_code, $response);
        }
    }
62652
public function redirectToIntended($default = '/', $status = 302, $headers = array(), $secure = null)
	{
		return $this->redirector->intended($default, $status, $headers, $secure);
	}
1359129
public function createRedirect(string $location, int $status = 307): ResponseInterface
    {
        return $this->responseFactory->createResponse($status)->withHeader('Location', $location);
    }
976673
protected function redirect($uri, $status = 302, array $headers = []): ResponseInterface
    {
        return $this->responseFactory->createRedirectResponse($uri, $status, $headers);
    }
1268238
public function to($path, $status = 302)
    {
        $this->to = $path;

        $this->response->status($status);

        return $this;
    }
1345252
public function send($content, int $status = HttpResponse::HTTP_OK, array $headers = []) : HttpResponse
    {
        $headers = array_merge($this->headers, $headers);

        if (is_array($content)) {
            $content = json_encode($content);
        }

        $response = $this->response->create($content, $status, $headers);

        return $this->createOnly ? $response : $response->send();
    }
1157652
protected function createRedirect( $path, $status, $headers )
	{
		$redirect = new RedirectResponse( $path, $status, $headers );

		if ( isset( $this->session ) )
			$redirect->setSession( $this->session );

		$redirect->setRequest( $this->generator->getRequest() );

		return $redirect;
	}
640755
protected function redirect($url, $status = 302)
    {
        return $this->getResponse()
            ->withStatus($status)
            ->withHeader('Location', (string)$url);
    }
507343
public function route($route, $parameters = [], $status = 302, $headers = [])
    {
        return $this->to($this->generator->route($route, $parameters), $status, $headers);
    }
87137
public function guest($path, $status = 302, $headers = [], $secure = null)
    {
        $request = $this->generator->getRequest();

        $intended = $request->method() === 'GET' && $request->route() && ! $request->expectsJson()
                        ? $this->generator->full()
                        : $this->generator->previous();

        if ($intended) {
            $this->setIntendedUrl($intended);
        }

        return $this->to($path, $status, $headers, $secure);
    }
790858
public function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null)
    {
        respondWith(response()->redirectToIntended($default, $status, $headers, $secure ));
    }
798716
public function redirect($route, $parameters = [], $status = 302)
    {
        return $this->application->redirect($this->path($route, $parameters), $status);
    }
1199699
protected function redirectView($url, $statusCode = Response::HTTP_FOUND, array $headers = [])
    {
        return View::createRedirect($url, $statusCode, $headers);
    }
769405
public static function redirect($url, $status = 302, $headers = array())
    {
        $redirect = new RedirectResponse($url, $status, $headers);
        $redirect->sendHeaders();
        die();
    }
478507
public function post($path, array $parameters, $authorization = false)
    {
    	$query = [];

    	if ($authorization)
    	    $query = [
    	        'client_id' => $this->client_key,
    	    	'client_secret' => $this->client_secret,
    	    	'redirect_uri' => $this->redirect_uri,			 
    	    	'grant_type' => 'authorization_code',
    	    ];

    	if ($parameters)
            $query = array_merge($query, $parameters);

        try {
    	    $response = $this->client->request('POST', $path, [
    	        'form_params' => $query,
		        'timeout' => self::TIMEOUT
    	    ]);

            return $this->toArray($response);
    	} 
    	catch (ClientException $e) {
    	    return $this->toArray($e->getResponse());
        }    	
    }