@@ -14,6 +14,7 @@ A modern PHP library for working with PSR-7 HTTP Messages, focusing on immutabil
1414---
1515
1616## ✨ Features
17+
1718- ✅ Fully PSR-7 compliant
1819- ✅ Strictly typed for PHP 8.3+
1920- ✅ Immutable by design (PSR-7 standard)
@@ -28,6 +29,7 @@ A modern PHP library for working with PSR-7 HTTP Messages, focusing on immutabil
2829``` bash
2930composer require fast-forward/http-message
3031```
32+
3133Requirements: PHP 8.3+, Composer
3234
3335---
@@ -57,18 +59,21 @@ echo $newResponse->getPayload()['success']; // false
5759```
5860
5961### Text Response Example
62+
6063``` php
6164use FastForward\Http\Message\TextResponse;
6265$text = new TextResponse('Hello, world!');
6366```
6467
6568### Empty Response Example
69+
6670``` php
6771use FastForward\Http\Message\EmptyResponse;
6872$empty = new EmptyResponse();
6973```
7074
7175### Redirect Response Example
76+
7277``` php
7378use FastForward\Http\Message\RedirectResponse;
7479$redirect = new RedirectResponse('https://example.com', true); // Permanent redirect
@@ -77,27 +82,30 @@ $redirect = new RedirectResponse('https://example.com', true); // Permanent redi
7782---
7883
7984## 🧰 API Summary
80- | Class/Method | Description | Docs |
81- | ----------------------| --------------------------------------------------| ------|
82- | [ JsonResponse] ( docs/api/responses.rst ) | JSON response with automatic headers | [ docs] ( docs/api/responses.rst ) |
83- | [ TextResponse] ( docs/api/responses.rst ) | Plain text response | [ docs] ( docs/api/responses.rst ) |
84- | [ HtmlResponse] ( docs/api/responses.rst ) | HTML response with correct Content-Type | [ docs] ( docs/api/responses.rst ) |
85- | [ EmptyResponse] ( docs/api/responses.rst ) | HTTP 204 No Content response | [ docs] ( docs/api/responses.rst ) |
86- | [ RedirectResponse] ( docs/api/responses.rst ) | HTTP redirect response (301/302) | [ docs] ( docs/api/responses.rst ) |
87- | [ getPayload()] ( docs/api/payload.rst ) | Returns the payload of the response | [ docs] ( docs/api/payload.rst ) |
88- | [ withPayload($data)] ( docs/api/payload.rst ) | Returns a new instance with a different payload | [ docs] ( docs/api/payload.rst ) |
85+
86+ | Class/Method | Description | Docs |
87+ | --------------------------------------------| -------------------------------------------------| --------------------------------|
88+ | [ JsonResponse] ( docs/api/responses.rst ) | JSON response with automatic headers | [ docs] ( docs/api/responses.rst ) |
89+ | [ TextResponse] ( docs/api/responses.rst ) | Plain text response | [ docs] ( docs/api/responses.rst ) |
90+ | [ HtmlResponse] ( docs/api/responses.rst ) | HTML response with correct Content-Type | [ docs] ( docs/api/responses.rst ) |
91+ | [ EmptyResponse] ( docs/api/responses.rst ) | HTTP 204 No Content response | [ docs] ( docs/api/responses.rst ) |
92+ | [ RedirectResponse] ( docs/api/responses.rst ) | HTTP redirect response (301/302) | [ docs] ( docs/api/responses.rst ) |
93+ | [ getPayload()] ( docs/api/payload.rst ) | Returns the payload of the response | [ docs] ( docs/api/payload.rst ) |
94+ | [ withPayload($data)] ( docs/api/payload.rst ) | Returns a new instance with a different payload | [ docs] ( docs/api/payload.rst ) |
8995
9096---
9197
9298## 🔌 Integration
99+
93100- Works out of the box with any PSR-7 compatible framework or library
94101- Designed to extend and complement [ ` nyholm/psr7 ` ] ( https://github.com/Nyholm/psr7 )
95102- Can be used with [ fast-forward/container] ( https://github.com/php-fast-forward/container ) for dependency injection
96103
97104---
98105
99106## 📁 Directory Structure Example
100- ```
107+
108+ ``` bash
101109src/
102110├── EmptyResponse.php
103111├── HtmlResponse.php
@@ -110,19 +118,22 @@ src/
110118---
111119
112120## ⚙️ Advanced/Customization
121+
113122- Extend any response class to add custom logic
114123- Compose with other PSR-7 middlewares or response decorators
115124- All interfaces are public and designed for extension
116125
117126---
118127
119128## 🛠️ Versioning & Breaking Changes
129+
120130- v1.4: PHP 8.3+ required, stricter typing, improved docs
121131- v1.0: Initial release
122132
123133---
124134
125135## ❓ FAQ
136+
126137** Q:** What PHP version is required?
127138** A:** PHP 8.3 or higher.
128139
@@ -144,17 +155,20 @@ src/
144155---
145156
146157## 🛡 License
158+
147159MIT © 2026 [ Felipe Sayão Lobato Abreu] ( https://github.com/mentordosnerds )
148160
149161---
150162
151163## 🤝 Contributing
164+
152165Contributions, issues, and feature requests are welcome!
153166Feel free to open a [ GitHub Issue] ( https://github.com/php-fast-forward/http-message/issues ) or submit a Pull Request.
154167
155168---
156169
157170## 🔗 Links
171+
158172- [ Repository] ( https://github.com/php-fast-forward/http-message )
159173- [ Packagist] ( https://packagist.org/packages/fast-forward/http-message )
160174- [ Sphinx Documentation] ( docs/index.rst )
0 commit comments