-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
31 lines (24 loc) · 757 Bytes
/
main.cpp
File metadata and controls
31 lines (24 loc) · 757 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <iostream>
#include <string>
#include "HTTPLib.h"
int main(void)
{
std::string val;
//std::cout << "Content-Type: text/plain\n\n";
HttpLib::HTTPResponse *res = new HttpLib::HTTPResponse();
HttpLib::HTTPRequest *http = new HttpLib::HTTPRequest();
//std::cout << http->getRequestMethod() << std::endl;
//std::cout << http->getParameter("test") << std::endl;
res->write(http->getRequestMethod());
res->write(http->getParameter("test"));
//res->write("XXXXXXXXXXXXXX");
//res->redirect("http://www.google.com");
//res->flush();
/*if(http->getRequestMethod().compare("POST") == 0){
std::cin >> val;
std::cout << val;
}*/
delete res;
delete http;
return 0;
}