{"id":35454538,"url":"https://github.com/vosaka-php/vosaka-http","last_synced_at":"2026-03-13T02:01:51.485Z","repository":{"id":302259499,"uuid":"1011818482","full_name":"vosaka-php/vosaka-http","owner":"vosaka-php","description":"A powerful asynchronous HTTP library for PHP built on top of the VOsaka async runtime system. This library provides both HTTP client and server capabilities with full PSR-7 compatibility.","archived":false,"fork":false,"pushed_at":"2026-03-07T22:27:13.000Z","size":199,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-03-07T23:28:00.420Z","etag":null,"topics":["async-await","asynchronous","asynchronous-programming","http-server","php"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vosaka-php.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-07-01T11:36:31.000Z","updated_at":"2026-03-07T22:26:50.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vosaka-php/vosaka-http","commit_stats":null,"previous_names":["vosaka-php/vosaka-http"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/vosaka-php/vosaka-http","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vosaka-php%2Fvosaka-http","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vosaka-php%2Fvosaka-http/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vosaka-php%2Fvosaka-http/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vosaka-php%2Fvosaka-http/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vosaka-php","download_url":"https://codeload.github.com/vosaka-php/vosaka-http/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vosaka-php%2Fvosaka-http/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30454982,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-12T21:31:01.033Z","status":"online","status_checked_at":"2026-03-13T02:00:07.565Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async-await","asynchronous","asynchronous-programming","http-server","php"],"created_at":"2026-01-03T05:57:08.255Z","updated_at":"2026-03-13T02:01:51.450Z","avatar_url":"https://github.com/vosaka-php.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# VOsaka HTTP\n\nAsynchronous HTTP library for PHP with PSR-7 messages, router, middleware, HTTP client, and HTTP server.\n\n## Features\n\n- Async HTTP client (`Browzr`)\n- Async HTTP server (`HttpServer`)\n- PSR-7 message implementation\n- Router with path params\n- Middleware stack (CORS, favicon, custom middleware)\n- Strict types, PHP 8+\n\n## Installation\n\n```bash\ncomposer require venndev/vosaka-http\n```\n\n## HTTP Server (Current Flow)\n\n`HttpServer` now runs this pipeline:\n\n`socket -\u003e read -\u003e string buffer -\u003e HTTP parser -\u003e handler -\u003e response builder -\u003e string -\u003e socket write`\n\nThis is implemented in:\n\n- [src/vosaka/http/server/HttpServer.php](src/vosaka/http/server/HttpServer.php)\n\n## Quick Start (Server)\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse Psr\\Http\\Message\\ServerRequestInterface;\nuse vosaka\\http\\message\\Response;\nuse vosaka\\http\\middleware\\CorsMiddleware;\nuse vosaka\\http\\router\\Router;\nuse vosaka\\http\\server\\HttpServer;\nuse vosaka\\foroutines\\AsyncMain;\n\n#[AsyncMain]\nfunction main() {\n    $router = Router::new()\n        -\u003eget('/health', function (ServerRequestInterface $req) {\n            return Response::json([\n                'status' =\u003e 'ok',\n                'time' =\u003e date('c'),\n            ]);\n        });\n\n    $server = HttpServer::new($router)\n        -\u003ewithDebugMode(true)\n        -\u003elayer(CorsMiddleware::permissive());\n\n    $server-\u003eserve('0.0.0.0:8888');\n}\n```\n\n## Quick Start (Client)\n\n```php\n\u003c?php\n\ndeclare(strict_types=1);\n\nrequire __DIR__ . '/vendor/autoload.php';\n\nuse vosaka\\http\\Browzr;\n\n$response = Browzr::get('https://httpbin.org/get')-\u003eawait();\necho $response-\u003egetStatusCode() . PHP_EOL;\n```\n\n## Local Test\n\n```bash\nphp tests/server.php\n```\n\n# Benchmark\n```yml\nPHP ➜  ~ wrk -t12 -c1000 -d30s http://192.168.2.8:8888\nRunning 30s test @ http://192.168.2.8:8888\n  12 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    74.85ms   13.03ms 248.39ms   82.83%\n    Req/Sec     1.11k   159.39     1.64k    76.43%\n  397881 requests in 30.10s, 162.02MB read\nRequests/sec:  13218.93\nTransfer/sec:      5.38MB\n\n\nNODEJS ➜  ~ wrk -t12 -c1000 -d30s http://192.168.2.8:8888\nRunning 30s test @ http://192.168.2.8:8888\n  12 threads and 1000 connections\n  Thread Stats   Avg      Stdev     Max   +/- Stdev\n    Latency    85.24ms   28.84ms 870.27ms   94.57%\n    Req/Sec     0.98k   186.48     1.69k    74.64%\n  352045 requests in 30.10s, 230.99MB read\n  Socket errors: connect 0, read 0, write 1558, timeout 0\nRequests/sec:  11695.57\nTransfer/sec:      7.67MB\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvosaka-php%2Fvosaka-http","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvosaka-php%2Fvosaka-http","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvosaka-php%2Fvosaka-http/lists"}