Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. ProxyItem.php

function ProxyItem::toRequestProxy

Returns a RequestProxy instance for the scheme of the request url

Parameters

string $scheme The scheme of the request url:

File

vendor/composer/composer/src/Composer/Util/Http/ProxyItem.php, line 105

Class

ProxyItem
@internal @author John Stevenson <john-stevenson@blueyonder.co.uk>

Namespace

Composer\Util\Http

Code

public function toRequestProxy(string $scheme) : RequestProxy {
    $options = [
        'http' => [
            'proxy' => $this->optionsProxy,
        ],
    ];
    if ($this->optionsAuth !== null) {
        $options['http']['header'] = $this->optionsAuth;
    }
    if ($scheme === 'http') {
        $options['http']['request_fulluri'] = true;
    }
    return new RequestProxy($this->url, $this->curlAuth, $options, $this->safeUrl);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal