Skip to content

Commit

Permalink
Actualize Early hints doc block
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk committed Feb 1, 2024
1 parent f8ee277 commit 4fcf592
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,12 @@ the `endOfStream` parameter set to `false`. This will send the response to the c
additional responses.

```php
/** @var \Spiral\RoadRunner\Http\HttpWorker $httpWorker */
$httpWorker->respond(103, header: ['Link' => ['</style.css>; rel=preload; as=style']], endOfStream: false);
$httpWorker->respond(200, body: $body);
/** @var \Spiral\RoadRunner\Http\PSR7Worker $psr7 */
$httpWorker = $psr7->getHttpWorker()
->respond(103, header: ['Link' => ['</style.css>; rel=preload; as=style']], endOfStream: false);

// End of stream will be sent automatically after PSR7Worker::respond() call
$psr7->respond(new Response(200, [], 'Hello RoadRunner!'));
```


Expand Down

0 comments on commit 4fcf592

Please sign in to comment.