---
title: "ServerSentEvent"
sidebar_label: "ServerSentEvent"
description: "Kotlin binding reference: ServerSentEvent."
---

<!-- Generated by tools/api_reference/generate_api_docs.py. Do not edit. -->

//[clika-runtime](../../../index.md)/[io.clika.runtime](../index.md)/[ServerSentEvent](index.md)

# ServerSentEvent

[common]\
class [ServerSentEvent](index.md)(val event: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;message&quot;, val data: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), val id: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;)

One Server-Sent-Events frame: its [event](event.md) type (`message` by default), its [data](data.md) payload and its [id](id.md).

## Constructors

| | |
|---|---|
| [ServerSentEvent](ServerSentEvent.md) | [common]<br>constructor(event: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;message&quot;, data: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html), id: [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) = &quot;&quot;) |

## Properties

| Name | Summary |
|---|---|
| [data](data.md) | [common]<br>val [data](data.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |
| [event](event.md) | [common]<br>val [event](event.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |
| [id](id.md) | [common]<br>val [id](id.md): [String](https://kotlinlang.org/api/core/kotlin-stdlib/kotlin/-string/index.html) |