Add the missing linkage of jsoncpp to autotest

master
Chunting Gu 6 years ago
parent ba9f6c4c23
commit c8409dbdf2

@ -25,4 +25,4 @@ if(UNIX)
endif()
add_executable(${AT_TARGET_NAME} ${AT_SRCS})
target_link_libraries(${AT_TARGET_NAME} webcc gtest ${TEST_LIBS})
target_link_libraries(${AT_TARGET_NAME} webcc jsoncpp gtest ${TEST_LIBS})

@ -11,6 +11,11 @@ bool kSslVerify = false;
bool kSslVerify = true;
#endif
static void PrintSeparator() {
static const std::string s_line(80, '-');
std::cout << s_line << std::endl;
}
int main() {
WEBCC_LOG_INIT("", webcc::LOG_CONSOLE);
@ -19,6 +24,8 @@ int main() {
session.set_ssl_verify(kSslVerify);
try {
PrintSeparator();
// Using request builder:
auto r = session.Request(webcc::HttpRequestBuilder{}.Get().
Url("http://httpbin.org/get").
@ -29,6 +36,8 @@ int main() {
std::cout << r->content() << std::endl;
PrintSeparator();
// Using shortcut:
r = session.Get("http://httpbin.org/get",
{ "key1", "value1", "key2", "value2" },
@ -38,6 +47,8 @@ int main() {
#if WEBCC_ENABLE_SSL
PrintSeparator();
// HTTPS support.
r = session.Get("https://httpbin.org/get");

@ -169,7 +169,8 @@ public:
// -----------------------------------------------------------------------------
void PrintSeparator() {
std::cout << std::string(80, '-') << std::endl;
static const std::string s_line(80, '-');
std::cout << s_line << std::endl;
}
void PrintBook(const Book& book) {

Loading…
Cancel
Save