
27 Mar
2018
27 Mar
'18
3:29 p.m.
On Tue, Mar 27, 2018 at 1:09 AM, DePizzottri via Boost-users <boost-users@lists.boost.org> wrote:
I need to send custom application specific header in the response, but http::response operates only with set of predefined http::field values.
Use the overload of basic_fields::insert which accepts a string_view for the field name: boost::beast::http::request<boost::beast::http::empty_body> req; req.insert("X-Application-Header", "Value"); See: <http://www.boost.org/doc/libs/1_66_0/libs/beast/doc/html/beast/ref/boost__beast__http__basic_fields/insert/overload2.html> Thanks