-
Notifications
You must be signed in to change notification settings - Fork 12
Utilities
h@di edited this page Jul 20, 2018
·
1 revision
Some useful function are available in utilities.hpp header:
-
std::string readFile(std::string filePath): returns contents of a file -
std::string getExtension(std::string filePath): returns extension of a file based on its name -
void printVector(std::vector<std::string>): prints contents of a vector -
std::vector<std::string> split(std::string s, std::string d): split stringsby delimiterd -
std::string urlEncode(std::string const &)&std::string urlDecode(std::string const &): url-encode and url-decode a string, specially useful when passing data through url-encoded forms and urls
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