mirror of
https://gitee.com/acl-dev/acl.git
synced 2024-12-15 09:20:52 +08:00
9697f95b8f
This reverts commit 15d999759e
.
29 lines
537 B
C++
29 lines
537 B
C++
#include "stdafx.h"
|
|
#include "base_action.h"
|
|
|
|
base_action::base_action(const acl::string& addr,
|
|
acl::HttpServletRequest& req, acl::HttpServletResponse& res)
|
|
: addr_(addr)
|
|
, req_(req)
|
|
, res_(res)
|
|
{
|
|
}
|
|
|
|
void base_action::set_conf(const char* path)
|
|
{
|
|
conf_ = path;
|
|
}
|
|
|
|
acl::json* base_action::get_json(void)
|
|
{
|
|
acl::json* json = req_.getJson();
|
|
if (json == NULL)
|
|
{
|
|
const char* ctype = req_.getContentType();
|
|
logger_error("getJson null, content-type: %s",
|
|
ctype ? ctype : "unknown");
|
|
}
|
|
|
|
return json;
|
|
}
|