Creates HTTP redirect response with $uri used as Location header.

@param string|UriInterface $uri
@param int $status
@param array $headers
@return ResponseInterface
976673
protected function redirect($uri, $status = 302, array $headers = []): ResponseInterface
    {
        return $this->responseFactory->createRedirectResponse($uri, $status, $headers);
    }
87729
public function post(string $uri, string $body='', array $headers=[])
  {
    $this->sendRequest($this->createRequest('POST',$uri,$body), $headers);

    return !is_null($this->getResponse());
  }
311157
public function post($uri, array $headers = [], $body = null)
    {
        return $this->send('POST', $uri, $headers, $body);
    }
261318
public function redirect($location, $statusCode = 302) {
        $this->response->setHeader('Location', $location, true, $statusCode);
        return $this;
    }
179185
public function redirect($from, $to, $status = 302)
    {
        $handler = function ($request, ResponseInterface $response) use ($to, $status) {
            return $response->withHeader('Location', (string)$to)->withStatus($status);
        };

        return $this->get($from, $handler);
    }
1013690
public function get($uri, array $headers = [], $body = null)
    {
        return $this->send(new \GuzzleHttp\Psr7\Request('GET', $uri, $headers, $body));
    }
632572
public function invoke($uri, $method, array $headers = [])
    {
        $client   = new Client();
        $res      = $client->createRequest(strtoupper($method), url('/') . '/' . $uri, array_merge($headers, $this->getHeaders()));
        $response = $res->send();
        $types    = $response->getHeader('Content-Type')->toArray();
        $body     = $response->getBody(true);
        foreach ($types as $type) {
            if ($type == 'application/json' && function_exists('json_decode') and is_string($body)) {
                return json_decode($body);
            }
        }

        return $body;
    }
273270
public function redirectToRoute($route, $parameters = [], $status = 302, $headers = [])
    {
        respondWith(response()->redirectToRoute($route, $parameters, $status, $headers));
    }
1183548
public function redirect($uri, int $code = 302): ResponseInterface
    {
        if (!is_string($uri) && !$uri instanceof UriInterface) {
            throw new ResponseException("Redirect allowed only for string or UriInterface uris");
        }

        return $this->responseFactory->createResponse($code)->withHeader("Location", (string)$uri);
    }
1320556
public function post($uri, $body, array $headers = [])
    {
        $defaultHeaders = [
            'Authorization' => "Bearer {$this->token}",
            'Content-Type' => 'application/json',
            'Accept' => 'application/json'
        ];

        $headers = array_merge($headers, $defaultHeaders);

        return $this->client->post($uri, [
            'headers' => $headers,
            'body' => $body
        ]);
    }
1122265
protected static function httpRedirect($url, $headers = [], $redirectCode = 301)
    {
        $url = new UrlObject($url);

        $headers['Location'] = $url->val();
        $response = new Response('', $redirectCode, $headers);
        $response->sendHeaders();
    }
790858
public function redirectToIntended($default = '/', $status = 302, $headers = [], $secure = null)
    {
        respondWith(response()->redirectToIntended($default, $status, $headers, $secure ));
    }
1225903
public function head($uri, array $headers = [])
	{
		return $this->sendRequest(
			$this->message->createRequest('HEAD', $uri, $headers, null)
		);
	}
1113370
public function post($uri, array $data = [], array $headers = [])
    {
        $server = $this->transformHeadersToServerVars($headers);

        return $this->call('POST', $uri, $data, [], [], $server);
    }
192067
public function redirect($url, $status = 302)
    {
        $response = $this;
        $response = $response->withAddedHeader('Location', (string)$url)->withStatus($status);
        return $response;
    }
1033078
public function createResponse($statusCode, array $headers = [], array $options = [])
    {
        $body = JsonRpc\json_encode($options);

        return new Response($statusCode, $headers, $body === false ? null : $body);
    }
1111227
public function redirect($url, $parameters = [], $status = 302)
    {
        if (substr($url, 0, 1) == '@') {
            $route = substr($url, 1);
            $url = $this->generateUrl($route, $parameters);
        }
        return new RedirectResponse($url, $status);
    }