ytake/extended-hack-http-request

extended interface for HTTP messages

Fund package maintenance!
ytake

Installs: 6 185

Dependents: 1

Suggesters: 0

Security: 0

Stars: 0

Watchers: 3

Forks: 0

Open Issues: 0

Language:Hack

0.1.2 2020-05-03 04:46 UTC

This package is auto-updated.

Last update: 2024-11-29 06:04:02 UTC


README

Defines common cross-framework interfaces to represent HTTP requests and responses

namespace Ytake\Extended\HttpMessage;

use namespace Facebook\Experimental\Http\Message;

interface ServerRequestInterface extends Message\ServerRequestInterface {

  public function getAttributes(): dict<string, mixed>;

  public function getAttribute<T>(string $name, ?T $default = null): T;

  public function withAttribute(string $name, mixed $value): this;

  public function withoutAttribute(string $name): this;
}