1
0
mirror of synced 2025-04-23 09:45:32 +03:00
cpp-httplib/example/ssecli.cc
2020-07-25 11:20:57 -04:00

22 lines
382 B
C++

//
// ssecli.cc
//
// Copyright (c) 2019 Yuji Hirose. All rights reserved.
// MIT License
//
#include <httplib.h>
#include <iostream>
using namespace std;
int main(void) {
httplib::Client2("http://localhost:1234")
.Get("/event1", [&](const char *data, size_t data_length) {
std::cout << string(data, data_length);
return true;
});
return 0;
}