cpp Rest API master
C++ library for REST API access with Qt, Curl and cpp-httplib backends
 
Loading...
Searching...
No Matches
sse_event.hpp
Go to the documentation of this file.
1#ifndef SSE_EVENT_HPP_INCLUDED
2#define SSE_EVENT_HPP_INCLUDED
3
4#include <string>
5
6namespace cpp_restapi
7{
14 struct SseEvent
15 {
16 std::string event;
17 std::string data;
18 std::string id;
19 int retry = -1;
20 };
21}
22
23#endif
Definition base_connection.hpp:13
Represents a single Server-Sent Event.
Definition sse_event.hpp:15
std::string id
Last event ID (from "id:" field)
Definition sse_event.hpp:18
int retry
Reconnection time in ms (from "retry:" field, -1 if not set)
Definition sse_event.hpp:19
std::string event
Event type (from "event:" field, empty if not set)
Definition sse_event.hpp:16
std::string data
Event data (from "data:" field(s), joined with newlines)
Definition sse_event.hpp:17