private function StreamHandler::add_proxy in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/guzzlehttp/guzzle/src/Handler/StreamHandler.php \GuzzleHttp\Handler\StreamHandler::add_proxy()
File
- vendor/
guzzlehttp/ guzzle/ src/ Handler/ StreamHandler.php, line 323
Class
- StreamHandler
- HTTP handler that uses PHP's HTTP stream wrapper.
Namespace
GuzzleHttp\HandlerCode
private function add_proxy(RequestInterface $request, &$options, $value, &$params) {
if (!is_array($value)) {
$options['http']['proxy'] = $value;
}
else {
$scheme = $request
->getUri()
->getScheme();
if (isset($value[$scheme])) {
if (!isset($value['no']) || !\GuzzleHttp\is_host_in_noproxy($request
->getUri()
->getHost(), $value['no'])) {
$options['http']['proxy'] = $value[$scheme];
}
}
}
}