[HttpClient] Issue notice when NativeHttpClient is used
This commit is contained in:
parent
cda20aa391
commit
874c1e6ab0
@ -61,6 +61,8 @@ final class HttpClient
|
|||||||
return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes);
|
return new AmpHttpClient($defaultOptions, null, $maxHostConnections, $maxPendingPushes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@trigger_error((\extension_loaded('curl') ? 'Upgrade' : 'Install').' the curl extension or run "composer require amphp/http-client" to perform async HTTP operations, including full HTTP/2 support', E_USER_NOTICE);
|
||||||
|
|
||||||
return new NativeHttpClient($defaultOptions, $maxHostConnections);
|
return new NativeHttpClient($defaultOptions, $maxHostConnections);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user