Allow to set buffer size for client; don't auto adjust reading buffer size; refine the global definitions.

This commit is contained in:
Chunting Gu
2019-02-11 12:46:27 +08:00
parent ae9d4efcf1
commit 3e60c76da1
47 changed files with 559 additions and 423 deletions
+6 -6
View File
@@ -40,7 +40,7 @@ class BookClientBase {
}
// Check HTTP response status.
bool CheckStatus(webcc::HttpStatus::Enum expected_status) {
bool CheckStatus(webcc::http::Status expected_status) {
int status = rest_client_.response_status();
if (status != expected_status) {
LOG_ERRO("HTTP status error (actual: %d, expected: %d).",
@@ -69,7 +69,7 @@ class BookListClient : public BookClientBase {
return false;
}
if (!CheckStatus(webcc::HttpStatus::kOK)) {
if (!CheckStatus(webcc::http::Status::kOK)) {
// Response HTTP status error.
return false;
}
@@ -97,7 +97,7 @@ class BookListClient : public BookClientBase {
return false;
}
if (!CheckStatus(webcc::HttpStatus::kCreated)) {
if (!CheckStatus(webcc::http::Status::kCreated)) {
return false;
}
@@ -123,7 +123,7 @@ class BookDetailClient : public BookClientBase {
return false;
}
if (!CheckStatus(webcc::HttpStatus::kOK)) {
if (!CheckStatus(webcc::http::Status::kOK)) {
return false;
}
@@ -141,7 +141,7 @@ class BookDetailClient : public BookClientBase {
return false;
}
if (!CheckStatus(webcc::HttpStatus::kOK)) {
if (!CheckStatus(webcc::http::Status::kOK)) {
return false;
}
@@ -154,7 +154,7 @@ class BookDetailClient : public BookClientBase {
return false;
}
if (!CheckStatus(webcc::HttpStatus::kOK)) {
if (!CheckStatus(webcc::http::Status::kOK)) {
return false;
}