Fixed example build errors
This commit is contained in:
parent
e0e5898601
commit
cf084e1db1
@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
#CXX = clang++
|
#CXX = clang++
|
||||||
CXXFLAGS = -std=c++14 -I.. -Wall -Wextra -pthread
|
CXXFLAGS = -std=c++11 -I.. -Wall -Wextra -pthread
|
||||||
|
|
||||||
OPENSSL_DIR = /usr/local/opt/openssl
|
OPENSSL_DIR = /usr/local/opt/openssl
|
||||||
OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -L$(OPENSSL_DIR)/lib -lssl -lcrypto
|
OPENSSL_SUPPORT = -DCPPHTTPLIB_OPENSSL_SUPPORT -I$(OPENSSL_DIR)/include -L$(OPENSSL_DIR)/lib -lssl -lcrypto
|
||||||
|
@ -17,7 +17,7 @@ int main(void) {
|
|||||||
auto scheme_host_port = "http://localhost:8080";
|
auto scheme_host_port = "http://localhost:8080";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
auto res = httplib::Client2(scheme_host_port).Get("/hi");
|
auto res = httplib::Client(scheme_host_port).Get("/hi");
|
||||||
|
|
||||||
if (res) {
|
if (res) {
|
||||||
cout << res->status << endl;
|
cout << res->status << endl;
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
int main(void) {
|
int main(void) {
|
||||||
httplib::Client2("http://localhost:1234")
|
httplib::Client("http://localhost:1234")
|
||||||
.Get("/event1", [&](const char *data, size_t data_length) {
|
.Get("/event1", [&](const char *data, size_t data_length) {
|
||||||
std::cout << string(data, data_length);
|
std::cout << string(data, data_length);
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user