From: Dean M. B. <mik...@gm...> - 2011-03-16 01:28:01
|
Hmmm... I thought I responded to this email. Anyway, please see details below: On Sat, Feb 26, 2011 at 4:48 AM, Severin Pappadeux <pap...@gm...> wrote: > Hi, All > below is echo server source code - Do Not Work. Could I extract headers from > request? >From the server handler, you can use the `request.headers` member -- that's a vector of http::request_header<Tag> types, which have a `name` and `value` member in turn. > Looking from three miles down to design decision, made in cpp-netlib, > it would be nice to have uniform methods, applicable to both request and > response. > There are, of course, some differences to be handled in a different way, but > for both > headers(request|response) shall return pointer/reference to headers, and > preferable of the same type, > body(request|response) shall return pointer/reference to headers, and > preferable of the same type > and so on and so forth. After all, they're very similar and both based upon > basic_message building block That's already done in 0.9. HTH -- Dean Michael Berris http://about.me/deanberris |