Skip to content

CodeWithSushil/async-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

44 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Async HTTP Client for PHP

Packagist Version Packagist Downloads Tests CodeQL

A fully async, non-blocking HTTP client built using stream_socket_client and stream_select. No cURL. No Guzzle.

Features

  • πŸŒ€ Non-blocking requests using PHP streams
  • πŸ” Multiple async requests in parallel
  • πŸ”„ Retries and timeout support
  • 🧩 PSR-18 / PSR-7 compatible
  • βœ… GET, POST, PUT, PATCH, DELETE supported

Install

composer require async-http/async-http

Example

<?php

require_once('vendor/autoload.php');

use Async\Http\AsyncHttpClient;

$url = 'https://jsonplaceholder.typicode.com/posts';

$client = new AsyncHttpClient();
foreach ($client->get($url) as $response) {
    echo $response->getBody();
}

About

πŸš€ Async, non-blocking HTTP client using PHP streams.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •  

Languages