2
0

ssecli.cc 381 B

123456789101112131415161718192021
  1. //
  2. // ssecli.cc
  3. //
  4. // Copyright (c) 2019 Yuji Hirose. All rights reserved.
  5. // MIT License
  6. //
  7. #include <httplib.h>
  8. #include <iostream>
  9. using namespace std;
  10. int main(void) {
  11. httplib::Client("http://localhost:1234")
  12. .Get("/event1", [&](const char *data, size_t data_length) {
  13. std::cout << string(data, data_length);
  14. return true;
  15. });
  16. return 0;
  17. }