Remove the useless method stat() from the PluginBase class (#563)

This commit is contained in:
An Tao 2020-09-10 08:45:23 +08:00 committed by GitHub
parent e032f9bd0e
commit 11cabfb546
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 8 deletions

View File

@ -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:

View File

@ -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()
{