GuzzleHttp\Client::transfer PHP Method

transfer() private method

The URI of the request is not modified and the request options are used as-is without merging in default options.
private transfer ( Psr\Http\Message\RequestInterface $request, array $options ) : GuzzleHttp\Promise\PromiseInterface
$request Psr\Http\Message\RequestInterface
$options array
return GuzzleHttp\Promise\PromiseInterface
    private function transfer(RequestInterface $request, array $options)
    {
        // save_to -> sink
        if (isset($options['save_to'])) {
            $options['sink'] = $options['save_to'];
            unset($options['save_to']);
        }
        // exceptions -> http_errors
        if (isset($options['exceptions'])) {
            $options['http_errors'] = $options['exceptions'];
            unset($options['exceptions']);
        }
        $request = $this->applyOptions($request, $options);
        $handler = $options['handler'];
        try {
            return Promise\promise_for($handler($request, $options));
        } catch (\Exception $e) {
            return Promise\rejection_for($e);
        }
    }