How it works?
As of the branch previous linked, it uses these declarations:
template <class Tag>
struct basic_message {
public:
typedef Tag tag;
typedef typename headers_container<Tag>::type headers_container_type;
typedef typename headers_container_type::value_type header_type;
typedef typename string<Tag>::type string_type;
headers_container_type& headers() { return headers_; }
headers_container_type const& headers() const { return headers_; }
string_type& body() { return body_; }
string_type const& body() const { return body_; }
string_type& source() { return source_; }
string_type const& source() const { return source_; }
string_type& destination() { return destination_; }
string_type const& destination() const { return destination_; }
private:
friend struct detail::directive_base<Tag>;
friend struct detail::wrapper_base<Tag, basic_message<Tag> >;
mutable headers_container_type headers_;
mutable string_type body_;
mutable string_type source_;
mutable string_type destination_;
};
This container is the base class template used to represent HTTP messages. It uses a "tag" type style specializations for a variety of trait classes, allowing for customization of the various parts of the message. For example, a user specializes headers_container<T> to determine what container type holds the header fields.
But there are few disadvantages of this library:
Disadvantages:
There are some problems with the container declaration:
The previous all previous stable versions of cpp-netlib can be downloaded from this url:
http://github.com/cpp-netlib/cpp-netlib/downloads
For downloading a development version:
The cpp-netlib uses Git for source control, so to use any development versions Git must be installed on your system.
Getting Boost:
cpp_netlib depends on Boost. It should work for any version of Boost above 1.45.0. If Boost is not installed on your system, the latest package can be found on the Boost website
Name | Views | Likes |
---|---|---|
cpp-netlib Introduction | 415 | 0 |
cpr library-Introduction | 1117 | 0 |
Comments