---
title: "ClikaRT::http::ServerSentEvent"
sidebar_label: "ServerSentEvent"
description: "One Server-Sent-Events frame. On the server (ServerResponse::sse) data is the payload to send (often a JSON delta) and a CR/LF in any field is stripped/normalized by the framer so it cannot inject ext…"
---

<!-- Generated by tools/doxygen2mdx from Doxygen XML. Do not edit. -->

<span class="api-kind api-kind--struct">struct</span>

**Header:** `ClikaRT/http/types.h`

One Server-Sent-Events frame. On the server ([`ServerResponse::sse`](./ServerResponse.md#sse)) [`data`](./ServerSentEvent.md#data) is the payload to send (often a JSON delta) and a CR/LF in any field is stripped/normalized by the framer so it cannot inject extra SSE fields; on the client ([`get_sse`](./index.md#get_sse) / [`post_sse`](./index.md#post_sse)) it is one parsed incoming event.

## Data members

### event {#event}

<div class="api-signature">

`std::string` **`event`** `= "message"`

</div>

event type ("message" is the SSE default)

<div class="api-declared">

Declared in `ClikaRT/http/types.h`, line 74

</div>

### data {#data}

<div class="api-signature">

`std::string` **`data`**

</div>

the payload (the [`data`](./ServerSentEvent.md#data)`:` field)

<div class="api-declared">

Declared in `ClikaRT/http/types.h`, line 75

</div>

### id {#id}

<div class="api-signature">

`std::string` **`id`**

</div>

last-event-id, for resumption

<div class="api-declared">

Declared in `ClikaRT/http/types.h`, line 76

</div>
