3 This file is part of libmsphttp
4 Copyright © 2008 Mikkosoft Productions, Mikko Rasa
5 Distributed under the LGPL
8 #ifndef MSP_HTTP_MESSAGE_H_
9 #define MSP_HTTP_MESSAGE_H_
13 #include <msp/core/variant.h>
22 typedef std::map<std::string, std::string> HeaderMap;
27 unsigned chunk_length;
33 virtual ~Message() { }
35 void set_header(const std::string &, const std::string &);
36 const std::string &get_header(const std::string &) const;
37 void add_content(const std::string &);
38 const std::string &get_content() const { return content; }
39 void set_user_data(const Variant &);
40 const Variant &get_user_data() const { return user_data; }
41 bool get_complete() const { return complete; }
42 unsigned parse_content(const std::string &);
43 virtual std::string str() const =0;
45 std::string str_common() const;