summaryrefslogtreecommitdiff
path: root/src/web_service/web_backend.cpp
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-02-19 21:15:06 -0500
committerGitHub <noreply@github.com>2020-02-19 21:15:06 -0500
commit2342c0d50e354826d28c5fbc58b76d0047ea5e72 (patch)
treeb188f799411ac05f76b01e3ff74d1047d6267753 /src/web_service/web_backend.cpp
parentbf0c929d4cafcdf08a66544e4e018f11fa11ed36 (diff)
parentd31156931dccf00fba15c789185796fd3f8dc006 (diff)
Merge pull request #3432 from brianclinkenbeard/update-httplib
Update httplib to 0.5.5
Diffstat (limited to 'src/web_service/web_backend.cpp')
-rw-r--r--src/web_service/web_backend.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/web_service/web_backend.cpp b/src/web_service/web_backend.cpp
index 6683f459f..737ffe409 100644
--- a/src/web_service/web_backend.cpp
+++ b/src/web_service/web_backend.cpp
@@ -73,14 +73,12 @@ struct Client::Impl {
if (!parsedUrl.GetPort(&port)) {
port = HTTP_PORT;
}
- cli = std::make_unique<httplib::Client>(parsedUrl.m_Host.c_str(), port,
- TIMEOUT_SECONDS);
+ cli = std::make_unique<httplib::Client>(parsedUrl.m_Host.c_str(), port);
} else if (parsedUrl.m_Scheme == "https") {
if (!parsedUrl.GetPort(&port)) {
port = HTTPS_PORT;
}
- cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port,
- TIMEOUT_SECONDS);
+ cli = std::make_unique<httplib::SSLClient>(parsedUrl.m_Host.c_str(), port);
} else {
LOG_ERROR(WebService, "Bad URL scheme {}", parsedUrl.m_Scheme);
return Common::WebResult{Common::WebResult::Code::InvalidURL, "Bad URL scheme"};
@@ -90,6 +88,7 @@ struct Client::Impl {
LOG_ERROR(WebService, "Invalid URL {}", host + path);
return Common::WebResult{Common::WebResult::Code::InvalidURL, "Invalid URL"};
}
+ cli->set_timeout_sec(TIMEOUT_SECONDS);
httplib::Headers params;
if (!jwt.empty()) {