I am working on an Oat++ project that will serve web pages, part of this will require cookies. In Oat++ how do you get the key/value pair for a cookie please?
In quart for Python I would use:
retrieved_token = request.cookies.get(self.COOKIE_TOKEN)
retrieved_username = request.cookies.get(self.COOKIE_USER)
What is the equivalent in Oat++ for C++ please?
Research
Setting a cookie in Oat++ is part of the header (see GitHub link here
In Oat++, there is no built-in getCookie method. You must manually parse it from the cookie header.
The util functions for parsing cookies:
In the controller: