PHPackages                             phasync/http-streamwrapper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. phasync/http-streamwrapper

ActiveLibrary[HTTP &amp; Networking](/categories/http)

phasync/http-streamwrapper
==========================

An HTTP stream wrapper that makes http:// and https:// requests in PHP asynchronous.

0.0.1-rc1(2y ago)101MITPHP

Since May 18Pushed 2y ago1 watchersCompare

[ Source](https://github.com/phasync/http-streamwrapper)[ Packagist](https://packagist.org/packages/phasync/http-streamwrapper)[ RSS](/packages/phasync-http-streamwrapper/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

phasync/http-streamwrapper
==========================

[](#phasynchttp-streamwrapper)

`phasync/http-streamwrapper` is a PHP package that makes all HTTP and HTTPS requests asynchronous transparently, when used within a phasync coroutine. This package allows you to perform HTTP operations like fetching data from URLs asynchronously, improving the efficiency of your I/O-bound tasks such as web requests.

Installation
------------

[](#installation)

You can install the package via Composer. There is no configuration needed as it automatically configures itself to be enabled inside coroutines and disables itself outside of coroutines.

```
composer require phasync/http-streamwrapper
```

Usage
-----

[](#usage)

When installing this package, async http:// and https:// I/O is automatically enabled inside phasync coroutines. It does not interfere with I/O outside of coroutines.

Example
-------

[](#example)

Here's an example of how to use phasync/http-streamwrapper within the phasync coroutine framework:

```
