package
0.0.0-20240925030927-d1e3643add27
Repository: https://github.com/cloudwego/hertz-examples.git
Documentation: pkg.go.dev

# README

sse

Introduction

This example shows how to use sse with reverseproxy.

Usage

  • Start server
go run main.go
  • Test
curl -N --location http://localhost:8080/proxy/sse

Result:

> curl -N --location http://localhost:8080/proxy/sse
event:timestamp
data:2023-10-09T22:32:14+08:00

event:timestamp
data:2023-10-09T22:32:14+08:00

event:timestamp
data:2023-10-09T22:32:14+08:00

event:timestamp
data:2023-10-09T22:32:14+08:00

event:timestamp
data:2023-10-09T22:32:14+08:00

event:timestamp
data:2023-10-09T22:32:15+08:00

event:timestamp
data:2023-10-09T22:32:15+08:00

event:timestamp
data:2023-10-09T22:32:15+08:00

event:timestamp
data:2023-10-09T22:32:15+08:00

event:timestamp
data:2023-10-09T22:32:15+08:00