if (!\
is_array($options['stream_context'
])) { throw new \
InvalidArgumentException('stream_context must be an array'
);
} $context = \
array_replace_recursive($context,
$options['stream_context'
]);
} // Microsoft NTLM authentication only supported with curl handler
if (isset($options['auth'
][2
]) && 'ntlm' ===
$options['auth'
][2
]) { throw new \
InvalidArgumentException('Microsoft NTLM authentication only supported with curl handler'
);
} $uri =
$this->
resolveHost($request,
$options);
$contextResource =
$this->
createResource( static function D
) use ($context,
$params) { return \
stream_context_create($context,
$params);
} );
return $this->
createResource( function D
) use ($uri, &
$http_response_header,
$contextResource,
$context,
$options,
$request) { $resource = @\
fopen((string) $uri, 'r', false,
$contextResource);
$this->lastHeaders =
$http_response_header ??
[];