#include <map>
#include <string>
#include <vector>
+#include <msp/net/mspnet_api.h>
namespace Msp {
namespace Http {
class Message;
-struct Header
+struct MSPNET_API Header
{
+ enum Style
+ {
+ DEFAULT,
+ SINGLE_VALUE,
+ LIST,
+ KEY_VALUE_LIST,
+ VALUE_WITH_ATTRIBUTES,
+ LIST_WITH_ATTRIBUTES
+ };
+
struct Value
{
std::string value;
};
std::string name;
+ Style style;
std::string raw_value;
std::vector<Value> values;
- Header() { }
- Header(const Message &, const std::string &);
- Header(const std::string &, const std::string &);
+ Header() = default;
+ Header(const Message &, const std::string &, Style = DEFAULT);
+ Header(const std::string &, const std::string &, Style = DEFAULT);
+
+ static Style get_default_style(const std::string &);
void parse();
};