Server sent event response viewer (#126)

This commit is contained in:
Gregory Schier
2024-10-11 06:52:32 -07:00
committed by GitHub
parent f974a66086
commit d754e7233d
24 changed files with 513 additions and 104 deletions
+1
View File
@@ -0,0 +1 @@
pub mod sse;
+12
View File
@@ -0,0 +1,12 @@
use serde::{Deserialize, Serialize};
use ts_rs::TS;
#[derive(Debug, Clone, Serialize, Deserialize, Default, TS)]
#[serde(default, rename_all = "camelCase")]
#[ts(export, export_to = "sse.ts")]
pub struct ServerSentEvent {
pub event_type: String,
pub data: String,
pub id: Option<String>,
pub retry: Option<u64>,
}