Skip to content

Commit 4fcf592

Browse files
committed
Actualize Early hints doc block
1 parent f8ee277 commit 4fcf592

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,12 @@ the `endOfStream` parameter set to `false`. This will send the response to the c
137137
additional responses.
138138

139139
```php
140-
/** @var \Spiral\RoadRunner\Http\HttpWorker $httpWorker */
141-
$httpWorker->respond(103, header: ['Link' => ['</style.css>; rel=preload; as=style']], endOfStream: false);
142-
$httpWorker->respond(200, body: $body);
140+
/** @var \Spiral\RoadRunner\Http\PSR7Worker $psr7 */
141+
$httpWorker = $psr7->getHttpWorker()
142+
->respond(103, header: ['Link' => ['</style.css>; rel=preload; as=style']], endOfStream: false);
143+
144+
// End of stream will be sent automatically after PSR7Worker::respond() call
145+
$psr7->respond(new Response(200, [], 'Hello RoadRunner!'));
143146
```
144147

145148

0 commit comments

Comments
 (0)