You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+51
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,57 @@ The package allows responding with data that is automatically converted into PSR
19
19
20
20
## General usage
21
21
22
+
The package provides `DataResponseFactory` class that, given a PSR-17 response factory, is able to create data response. In this example we use `nyholm/psr7` pacakge but any PSR-17 response factory would do.
23
+
24
+
Data response contains raw data to be processed later.
25
+
26
+
```php
27
+
use Nyholm\Psr7\Factory\Psr17Factory;
28
+
use Yiisoft\DataResponse\DataResponseFactory;
29
+
30
+
$factory = new DataResponseFactory(new Psr17Factory());
0 commit comments