Update server_sent_events.markdown
This commit is contained in:
parent
edf76a05b2
commit
b1ca30f30e
1 changed files with 1 additions and 6 deletions
|
@ -62,11 +62,7 @@ If you want to test the server-sent events without creating a website, the Pytho
|
||||||
$ pip3 install sseclient
|
$ pip3 install sseclient
|
||||||
```
|
```
|
||||||
|
|
||||||
<<<<<<< HEAD
|
A simple script to consume SSE in Python looks like this:
|
||||||
The simplest script to consume the SSE looks like the following snippet.
|
|
||||||
=======
|
|
||||||
The simplest script to consume the SSE in Python looks like this:
|
|
||||||
>>>>>>> current
|
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from sseclient import SSEClient
|
from sseclient import SSEClient
|
||||||
|
@ -75,4 +71,3 @@ messages = SSEClient('http://localhost:8123/api/stream?api_password=YOUR_PASSWOR
|
||||||
for msg in messages:
|
for msg in messages:
|
||||||
print(msg)
|
print(msg)
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue