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
- Host: GitHub
- URL: https://github.com/krakphp/http-message
- Owner: krakphp
- Created: 2017-05-31T15:36:21.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-31T15:36:45.000Z (about 9 years ago)
- Last Synced: 2025-03-04T04:17:27.670Z (over 1 year ago)
- Language: PHP
- Size: 7.81 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.