From: Dean M. B. <mik...@gm...> - 2008-09-08 05:51:35
|
Hi Guys, I'd just like to post on the list two additional constructor options which the http::client now supports (mainly a brain dump for documentation): Enabling http::client features can be done by passing constructor options. These two new constructor options are: * http::client::cache_resolved -- enable caching of resolved endpoints, to prevent the client from resolving IP addresses of previously resolved hostnames * http::client::follow_redirects / http::client::follow_redirect -- follow HTTP redirect(s) (300..307) by looking at the "Location" header provided by the response(s); headers present in the original request are preserved in the subsequent request(s). A new member function 'clear_cached()' has been added to clear the resolved endpoint cache. The following are TODO's related to these two new features: - Expiring resolved cached endpoints (configurable?) - Limiting the depth of redirect resolution (configurable?) - Use Boost.Parameters library to enable named parameters The default behavior of the http::client (when default constructed) is to: * NOT cache resolved endpoints * NOT follow redirects Questions and discussion most welcome (this is in preparation for release 0.3) HTH! -- Dean Michael C. Berris Software Engineer, Friendster, Inc. |