An open API service indexing awesome lists of open source software.

https://github.com/krakphp/http-message

PSR7 Http Message Utilities
https://github.com/krakphp/http-message

Last synced: about 1 year ago
JSON representation

PSR7 Http Message Utilities

Awesome Lists containing this project

README

          

# Http Message Utilities

Simple utilities for the psr http message (psr7) specification.

## Headers

We provide several utilities for parsing special headers.

Each header class is named after the specific http header and has the following functions for parsing and signing.

Here's an example using the AcceptHeader class

```php
signHttpMessage($req);

// You can also export the header as a string
echo $accept_header;
```

We provide abstractions with the following classes:

- `Krak\HttpMessage\AuthorizationHeader`
- `Krak\HttpMessage\AcceptHeader`
- `Krak\HttpMessage\ContentTypeHeader`

## Matchers

The `Krak\HttpMessage\Match` directory holds functional utilities for creating matchers for http message requests.