ipkn / crow

Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)
BSD 3-Clause "New" or "Revised" License
7.46k stars 889 forks source link

set cookie with json response #354

Open UtopiaBe opened 4 years ago

UtopiaBe commented 4 years ago

Hello, how can i return a json response to the client and also add a header with Set-Cookie?

mrozigor commented 4 years ago

Did you try to do something similar as in https://github.com/ipkn/crow/blob/49edf898a5b9a39a0d69072cc2434c4f23692908/examples/example_chat.cpp#L51 and add res.add_header("Set-Cookie", "")?