ytake/extended-hack-http-request

extended interface for HTTP messages

Fund package maintenance!
ytake

Installs: 6 184

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-04-29 04:15:45 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;
}