To our knowledge, this repository is unused. We keep it here in case it is useful for anyone, but the code is not maintained.
Convert uses of fopen and file_get_contents to HTTPlug requests.
Warning 1: There is an increased risk for problems because of how deeply the stream wrapper touches into the PHP core. Internally we use stream_wrapper_unregister
and stream_wrapper_register
.
Warning 2: Instead of using the stream wrapper you should should try to port libraries to use Httplug for a more robust solution.
Via Composer
$ composer require php-http/httplug-stream-wrapper
$httpClient = HttpClientDiscovery::find();
StreamWrapper::enable($httpClient);
Please see the official documentation.
Then the test suite:
$ composer test
Please see our contributing guide.
If you discover any security related issues, please contact us at [email protected].
The MIT License (MIT). Please see License File for more information.