Skip to content

About

Triangle HTTP Engine

Topics

Resources

Code of conduct

Contributing

Stars

4 stars

Watchers

1 watching

Forks

Repository files navigation

Скачивания Коммиты Версия Версия PHP Лицензия

Triangle Engine HTTP

HTTP adapter for Triangle applications. It connects request handling to Localzet Server 7, Triangle Router, and Middleware; the application bootstrap remains responsible for configuration, routes, and listener startup.

Compatibility

Release 3.x targets PHP 8.1+, Localzet Server 7.1+, Triangle Engine 9, Router 2, Middleware 2, and the PHP cURL extension. Release 2.x remains on the earlier Engine compatibility line. Do not mix the two dependency sets in one lock file.

Install

composer require triangle/engine-http:^3.0

Follow the installation guide for the complete bootstrap and version checks.

Request and response flow

Register routes before collecting the Router dispatcher:

use localzet\Server\Protocols\Http\Response;
use Triangle\Router;

Router::any('/health', static fn () => new Response(
    200,
    ['Content-Type' => 'application/json'],
    '{"status":"ok"}',
));

Router::collect([]);

Engine HTTP sends requests through route middleware and controller resolution. A Localzet Server HTTP response keeps its status, headers, and body. Other return values become a 200 response with a string body.

Security and limits

  • Authentication and authorization belong to the application or its middleware.
  • CORS is not enabled by default. Configure app.http_headers with explicit origins and headers when cross-origin access is required.
  • PHP files under a public path are disabled by default; enable them only when the application has a clear need and a reviewable execution boundary.
  • Listener, HTTP framing, worker lifecycle, and backpressure are provided by Localzet Server.

See the request guide, configuration, and security guide for production setup.

Checks

composer validate --strict --no-check-publish --no-interaction
composer run test --no-interaction
composer audit --abandoned=report

The test command covers response compatibility and a loopback HTTP request against Server 7.

License

AGPL-3.0-or-later. See LICENSE.

About

Triangle HTTP Engine

Topics

Resources

Code of conduct

Contributing

Stars

4 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages