15 lines
400 B
C++
15 lines
400 B
C++
// Route: GET /sse/events
|
|||
|
|
#include "support/Assert.hpp"
|
||
|
|
|
||
|
|
using namespace molo::example::test;
|
||
|
|
|
||
|
|
int main() {
|
||
|
|
Fixture f;
|
||
|
|
auto res = f.client->get("/sse/events");
|
||
|
|
check(res.status == 200, "status 200");
|
||
|
|
check(contains(res.headers.get("Content-Type"), "text/event-stream"),
|
||
|
|
"sse content type");
|
||
|
|
check(contains(res.body, "data: hello"), "event framed");
|
||
|
|
return finish("sse/events");
|
||
|
|
}
|