You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
1.1 KiB
35 lines
1.1 KiB
#ifndef TESTCONTROLLER_H
|
|
#define TESTCONTROLLER_H
|
|
|
|
#include "Core/BaseController.h"
|
|
|
|
class TestController : public BaseController<TestController>
|
|
{
|
|
public:
|
|
TestController();
|
|
|
|
///
|
|
/// curl --request GET \
|
|
/// --url http://127.0.0.1:8080/test \
|
|
/// --header 'Accept: */*' \
|
|
/// --header 'Accept-Encoding: gzip, deflate, br' \
|
|
/// --header 'Connection: keep-alive' \
|
|
/// --header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0'
|
|
///
|
|
int get(HttpRequest *req, HttpResponse *resp) override;
|
|
|
|
/// curl --request POST \
|
|
/// --url http://127.0.0.1:8080/test \
|
|
/// --header 'Accept: */*' \
|
|
/// --header 'Accept-Encoding: gzip, deflate, br' \
|
|
/// --header 'Connection: keep-alive' \
|
|
/// --header 'Content-Type: application/json' \
|
|
/// --header 'User-Agent: PostmanRuntime-ApipostRuntime/1.1.0' \
|
|
/// --data '{"TEST":"this is a Test"}'
|
|
int post(HttpRequest *req, HttpResponse *resp) override;
|
|
|
|
int put(HttpRequest *req, HttpResponse *resp) override;
|
|
};
|
|
|
|
#endif // TESTCONTROLLER_H
|