cpp-httplib/example/ssecli.cc

22 lines
381 B
C++
Raw Normal View History

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