Skip to content

Commit 3126da0

Browse files
authored
[HttpClient] Import ServerSentEvent class
This PR adds the missing class import in the "Consuming Server-Sent Events" section.
1 parent c159fee commit 3126da0

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

http_client.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1264,7 +1264,8 @@ Symfony's HTTP client provides an EventSource implementation to consume these
12641264
server-sent events. Use the :class:`Symfony\\Component\\HttpClient\\EventSourceHttpClient`
12651265
to wrap your HTTP client, open a connection to a server that responds with a
12661266
``text/event-stream`` content type and consume the stream as follows::
1267-
1267+
1268+
use Symfony\Component\HttpClient\Chunk\ServerSentEvent;
12681269
use Symfony\Component\HttpClient\EventSourceHttpClient;
12691270

12701271
// the second optional argument is the reconnection time in seconds (default = 10)

0 commit comments

Comments
 (0)