Cleanup async client APIs.
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user