Skip to content

laik/process

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Process

server

go run main.go

client

# Using curl with the bash script
./sse_client.sh T100

# Or using the original curl command
curl -N -X POST "http://localhost:1323/api/process?sse=1" \
     -H "Accept: text/event-stream" \
     -H "Content-Type: application/json" \
     -d '{"task_id":"T2"}'

     # or

python3 client.py

output

(.venv) ➜  process ./sse_client.sh
📡 Connected to SSE stream for task: T100

🚀 start processing task T100
Processing [████████████████████████████████████████] 3/3 (100%)
✅ task T100 completed
^C

About

sse example

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors