Sese Framework  2.3.0
A cross-platform framework
Loading...
Searching...
No Matches
Controller.h File Reference

Controller. More...

#include <sese/net/http/HttpServletContext.h>
#include <set>
#include <vector>
#include <functional>
#include <utility>

Go to the source code of this file.

Classes

class  sese::net::http::Servlet
 HTTP applications. More...
 
class  sese::net::http::Controller
 HTTP controller. More...
 

Namespaces

namespace  sese
 
namespace  sese::net
 
namespace  sese::net::http
 

Macros

#define SESE_CTRL(name, ...)
 
#define SESE_URL(name, method, url)
 

Detailed Description

Controller.

Author
kaoru
Version
0.1
Date
September 13, 2023

Macro Definition Documentation

◆ SESE_CTRL

#define SESE_CTRL ( name,
... )
Value:
class name final : public sese::net::http::Controller { \
public: \
using RequestType = sese::net::http::RequestType; \
name() : Controller() { \
} \
void init() override; \
\
private: \
__VA_ARGS__; \
}; \
void name::init()

Define a controller

Parameters
nameController name
...Controller members

◆ SESE_URL

#define SESE_URL ( name,
method,
url )
Value:
this->servlets.emplace_back(method, url); \
sese::net::http::Servlet &name = servlets[servlets.size() - 1]; \

Register a URL path

Parameters
nameInternal name
methodExpected HTTP method
urlRegistered URL link
Note
<key> Required parameter key is passed as an HTTP header, {key} required parameter key is passed as a query parameter