-
Notifications
You must be signed in to change notification settings - Fork 12
Request
h@di edited this page Jul 20, 2018
·
1 revision
Request(std::string method = "GET")-
methodcan be"GET"and"POST".
You can access and modify contents of Requset-Line using following functions:
Method getMethod()
enum Method { GET, POST };std::string getPath()void setPath(std::string)
You can access and modify contents of Query using following functions:
-
std::string getQueryString():?-started,&-separated url-encoded query string std::string getQueryParam(std::string key)void setQueryParam(std::string key, std::string value, bool encode = true)
You can access and modify contents of Header using following functions:
std::string getHeader(std::string key)-
cimap getHeaders():cimapis a Case-Insensitivestd::map<std::string, std::string> void setHeader(std::string key, std::string value, bool encode = true)
You can access and modify contents of Body using following functions:
-
std::string getBody()And forapplication/x-www-form-urlencodedrequests: std::string getBodyParam(std::string key)void setBodyParam(std::string key, std::string value, bool encode = true)
AP HTTP
University of Tehran / Advanced Programming
- Quick How-to & Examples
- Creating a New Server
-
Request Handlers
- Serving Static Files
- Serving Dynamic Files
- Getting Data from Client-side
- Redirection
- Serving Template Files
- Template Files
-
Request- Request-Line
- Query
- Haeder
- Body
-
Response- Status-Line
- Header
- Body
- Session
- Utilities
- Compile and Run