emsApplication/applications/WebConfigure/cgiCommon/main.cpp

41 lines
665 B
C++
Raw Normal View History

2024-05-24 12:19:45 +08:00
#include <cgicc/Cgicc.h>
#include <cgicc/CgiDefs.h>
#include <cgicc/HTTPHTMLHeader.h>
#include <cgicc/HTMLClasses.h>
#include "handleHeader.h"
// 你的CGI处理函数声明
void handleLoginRequest(cgicc::Cgicc& cgi);
void handleSignupRequest(cgicc::Cgicc& cgi);
// 添加更多处理函数...
int main()
{
using namespace cgicc;
using namespace std;
Cgicc formData;
//获得api方法
form_iterator fi = formData.getElement("do");
if (!fi->isEmpty() && fi != (*formData).end())
{
//std::cout << "api:" << **fi << std::endl;
if (**fi == "login")
{
handleLoginRequest(formData);
}
if (**fi == "getDevices")
{
}
}
return 0;
}