Skip to content
This repository has been archived by the owner on Jun 1, 2023. It is now read-only.

Migrate from PSR7

Pre-release
Pre-release
Compare
Choose a tag to compare
@fredemmott fredemmott released this 10 Dec 21:08

This release uses hack-http-request-response-interfaces instead of PSR-7; this brings more type-safety, and is generally more suited for Hack than for PHP.

hackttp is an implementation of these interfaces.

Example usage:

<<__Entrypoint>>
async function main(): Awaitable<noreturn> {
  $request = Usox\HackTTP\ServerRequest\createFromGlobals();
  $responder = (new MyRouter())->routeRequest($request);
  // ...
  exit(0);
}