-
Notifications
You must be signed in to change notification settings - Fork 75
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bump cpp-httplib version to v0.7.6 latest #883
Changes from all commits
0d90649
01a1c0f
7b557f7
8d3f815
606cb75
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,10 +37,17 @@ | |
// | ||
|
||
|
||
#include <httplib.h> | ||
#include <iostream> | ||
#include <cstring> | ||
|
||
// save diagnostic state | ||
#pragma GCC diagnostic push | ||
// turn off the specific warning. Can also use "-Wall" | ||
#pragma GCC diagnostic ignored "-Wsign-compare" | ||
#include <httplib.h> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
I don't know of a way to get around the warnings other than with the #pragma. |
||
// turn back on the compiler warnings | ||
#pragma GCC diagnostic pop | ||
|
||
//#define CA_CERT_FILE "./ca-bundle.crt" | ||
#define DEFAULT_PORT 8050 | ||
#define DEFAULT_HOST "127.0.0.1" | ||
|
@@ -78,7 +85,7 @@ int main(int argc, char **argv) { | |
|
||
VERBOSE << "Connecting to server: " + serverHost + " port: " << port << std::endl; | ||
httplib::Client client(serverHost.c_str(), port); | ||
client.set_timeout_sec(30); // The time it waits for a network connection. | ||
//client.set_timeout_sec(30); // The time it waits for a network connection. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @Zbysekz did you find out if there's a replacement for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Asked question yhirose/cpp-httplib#642 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We have an answer: There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nice! sorry for merging early. Yes, we can start a new PR where you can revert commit
nor do i. our tests passed even without it. maybe in the server it makes sense, in the unit tests 30sec is imho too much. |
||
|
||
// request "Hello World" to see if we are able to connect to the server. | ||
VERBOSE << "GET /hi" << std::endl; | ||
|
@@ -161,4 +168,4 @@ int main(int argc, char **argv) { | |
} | ||
VERBOSE << "Anomaly Score: " << res->body << std::endl; | ||
return 0; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @dkeeney for the advice!,
I tried this, by adding
"SYSTEM"
to theset(EXTERNAL_INCLUDES ...)
but that didn't work as intended...so I fixed all ocurences of EXTERNAL_INCLUDES in
target_include_dirs()
with SYSTEM, that works.But not for
httplib
, unfortunately. Is it included in the EXTERNAL_INCLUDES, or does it use a different means of including?