Cleanup async client APIs.

This commit is contained in:
Chunting Gu
2019-03-07 16:02:49 +08:00
parent ffa0794926
commit 31d0ea3c9d
74 changed files with 267 additions and 2106 deletions
+1 -2
View File
@@ -9,8 +9,7 @@ set(SRCS
add_executable(${TARGET_NAME} ${SRCS})
target_link_libraries(${TARGET_NAME} webcc jsoncpp ${Boost_LIBRARIES})
target_link_libraries(${TARGET_NAME} "${CMAKE_THREAD_LIBS_INIT}")
target_link_libraries(${TARGET_NAME} ${EXAMPLE_COMMON_LIBS} jsoncpp)
# Install VLD DLLs to build dir so that the example can be launched from
# inside VS.
+4 -4
View File
@@ -20,7 +20,7 @@
// -----------------------------------------------------------------------------
class BookClientBase {
public:
public:
BookClientBase(const std::string& host, const std::string& port,
int timeout_seconds)
: host_(host), port_(port) {
@@ -29,7 +29,7 @@ class BookClientBase {
virtual ~BookClientBase() = default;
protected:
public:
// Helper function to make a request.
webcc::HttpRequestPtr MakeRequest(const std::string& method,
const std::string& url,
@@ -71,7 +71,7 @@ class BookClientBase {
// -----------------------------------------------------------------------------
class BookListClient : public BookClientBase {
public:
public:
BookListClient(const std::string& host, const std::string& port,
int timeout_seconds)
: BookClientBase(host, port, timeout_seconds) {
@@ -131,7 +131,7 @@ class BookListClient : public BookClientBase {
// -----------------------------------------------------------------------------
class BookDetailClient : public BookClientBase {
public:
public:
BookDetailClient(const std::string& host, const std::string& port,
int timeout_seconds)
: BookClientBase(host, port, timeout_seconds) {