|
Web framework C++
2.0.0
Simple web framework on c++ designed to easily create web pages, etc
|
wrapper class for http headers More...
#include <headers.h>

Public Member Functions | |
| Headers () | |
| ~Headers () | |
| Headers (std::string &httpHeaders) | |
| std::string | toString () |
| std::unordered_map< std::string, std::string > | getHeaders () |
| void | add (const char *key, const char *value) |
| bool | getValue (const char *key, std::string &value) |
| void | clear () |
wrapper class for http headers
Headers consist of map with key-value pairs, and is using for Request and Response http objects
| Headers::Headers | ( | ) |
create empty headers object
| Headers::~Headers | ( | ) |
cleanup map of key-value pairs
|
explicit |
create Headers, parsing http input string
| httpHeaders | input http headers string |
| void Headers::add | ( | const char * | key, |
| const char * | value | ||
| ) |
insert value by key to map, if key exists, it will be overwritten
| key | input key |
| value | input value |
| void Headers::clear | ( | ) |
delete all data
| std::unordered_map<std::string, std::string> Headers::getHeaders | ( | ) |
get current map
| bool Headers::getValue | ( | const char * | key, |
| std::string & | value | ||
| ) |
get value from map by key
| key | searched key |
| value | out param, if key exists, value will be written, nothing do otherwise |
| std::string Headers::toString | ( | ) |
serialize Headers to string
1.8.11