Add query parameters to RestService::Handle()
This commit is contained in:
@@ -117,6 +117,7 @@ static bool BookFromJson(const std::string& json, Book* book) {
|
||||
|
||||
bool BookListService::Handle(const std::string& http_method,
|
||||
const std::vector<std::string>& url_sub_matches,
|
||||
const std::map<std::string, std::string>& query,
|
||||
const std::string& request_content,
|
||||
std::string* response_content) {
|
||||
if (http_method == webcc::kHttpGet) {
|
||||
@@ -149,6 +150,7 @@ bool BookListService::Handle(const std::string& http_method,
|
||||
|
||||
bool BookDetailService::Handle(const std::string& http_method,
|
||||
const std::vector<std::string>& url_sub_matches,
|
||||
const std::map<std::string, std::string>& query,
|
||||
const std::string& request_content,
|
||||
std::string* response_content) {
|
||||
if (url_sub_matches.size() != 1) {
|
||||
|
||||
@@ -22,6 +22,7 @@ public:
|
||||
|
||||
bool Handle(const std::string& http_method,
|
||||
const std::vector<std::string>& url_sub_matches,
|
||||
const std::map<std::string, std::string>& query,
|
||||
const std::string& request_content,
|
||||
std::string* response_content) override;
|
||||
};
|
||||
@@ -41,6 +42,7 @@ public:
|
||||
|
||||
bool Handle(const std::string& http_method,
|
||||
const std::vector<std::string>& url_sub_matches,
|
||||
const std::map<std::string, std::string>& query,
|
||||
const std::string& request_content,
|
||||
std::string* response_content) override;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user