From 11cabfb546528b9d89e06a180e2d6251356a5a42 Mon Sep 17 00:00:00 2001 From: An Tao Date: Thu, 10 Sep 2020 08:45:23 +0800 Subject: [PATCH] Remove the useless method stat() from the PluginBase class (#563) --- README.md | 2 +- lib/inc/drogon/plugins/Plugin.h | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/README.md b/README.md index 3b6c89c3..7671d88e 100755 --- a/README.md +++ b/README.md @@ -113,7 +113,7 @@ void TestCtrl::asyncHandleHttpRequest(const HttpRequestPtr& req, } ``` -**Most of the above programs can be automatically generated by the command line tool `drogon_ctl` provided by drogon** (The cammand is `drogon_ctl create controller TestCtrl`). All the user needs to do is add their own business logic. In the example, the controller returns a `Hello, world!` string when the client accesses the `http://ip/test` URL. +**Most of the above programs can be automatically generated by the command line tool `drogon_ctl` provided by drogon** (The command is `drogon_ctl create controller TestCtrl`). All the user needs to do is add their own business logic. In the example, the controller returns a `Hello, world!` string when the client accesses the `http://ip/test` URL. For JSON format response, we create the controller as follows: diff --git a/lib/inc/drogon/plugins/Plugin.h b/lib/inc/drogon/plugins/Plugin.h index 4a9f7b5c..af893ce4 100644 --- a/lib/inc/drogon/plugins/Plugin.h +++ b/lib/inc/drogon/plugins/Plugin.h @@ -35,13 +35,6 @@ enum class PluginStatus class PluginBase : public virtual DrObjectBase, public trantor::NonCopyable { public: - /// This method is usually called by drogon. - /// It always returns PlugiinState::Initialized if the user calls it. - PluginStatus stat() const - { - return status_; - } - /// This method must be called by drogon. void initialize() {