eidheim / Simple-Web-Server

A very simple, fast, multithreaded, platform independent HTTP and HTTPS server and client library implemented using C++11 and Boost.Asio. Created to be an easy way to make REST resources available from C++ applications.
MIT License
2.61k stars 751 forks source link

There is no set-cookie method? #193

Open sunryy opened 6 years ago

sunryy commented 6 years ago

It's my need to put some information into cookie , transport to client.but I can not find related method!

sunryy commented 6 years ago

@sebt3 @Skywalker13

eidheim commented 6 years ago

This method is lacking for the time being, but you can do it your self by using Percent::encode (https://github.com/eidheim/Simple-Web-Server/blob/master/utility.hpp#L42) on the cookie values. I'll might create HttpHeader::FieldValue::SemicolonSeparatedAttributes::create as a way to create Set-Cookie value from a CaseInsensitiveMultimap.