Skip to content

rongfengliang/pushpin-openresty-docker-compose

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pushpin with openresty

stream

  • access
curl -i http://localhost:7999/userinfo

  • publish message
curl -X POST \
  http://localhost:8080/userinfo \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: a401a816-2f51-4183-811b-b62a5c9c66a3' \
  -H 'cache-control: no-cache' \
  -d '{
 "channel":"userinfo",
 "data":{
  "username":"demoapp\n,userinfo app \\n",
  "userage":333
 }
}'

sse

  • access
http://localhost:7999/sse with broswer or some tools
  • publish message

be like sse message type

curl -X POST \
  http://localhost:8080/sse \
  -H 'Content-Type: application/json' \
  -H 'Postman-Token: eb2dda2f-705a-42d8-87dd-be3036dd632c' \
  -H 'cache-control: no-cache' \
  -d '{
	"channel":"loginfo",
	"data": "event: userlogin\ndata: demo login \n\n"
}'

Releases

No releases published

Packages

No packages published